Proposal (Trac ticket #3671): Add takeRec, genericTakeRec and spanRec to Data.List

Bulat Ziganshin bulat.ziganshin at gmail.com
Wed Nov 18 22:28:49 EST 2009


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 at gmail.com



More information about the Libraries mailing list