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:[EMAIL PROTECTED]
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe