
15 Jun
2007
15 Jun
'07
6:38 a.m.
Daniel Fischer wrote:
What about
blocks w h = concatMap transpose . map (map (chop w)) . chop h
Seems right. I arrived at something else: divide w h ls = concatMap (foldr (zipWith (:) . chop w) (repeat [])) (chop h ls) That uses fewer intermediate lists, and indeed should be equivalent to the above up to some fusion calculations (fusing concatMap with map, and fusing the foldr-based definition of transpose with the remaining map). Ciao, Janis. -- Dr. Janis Voigtlaender http://wwwtcs.inf.tu-dresden.de/~voigt/ mailto:voigt@tcs.inf.tu-dresden.de