
18 Nov
2009
18 Nov
'09
10:28 p.m.
Hello Malcolm, Thursday, November 19, 2009, 4:15:17 AM, you wrote:
groupsOf n = takeWhile (not . null) . map (take n) . iterate (drop n)
+1 for the name. Nice combinator-based definition too. (How does its performance compare to a directly recursive defn??)
take+drop combination should be slower than splitAt -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com