inits

Bulat Ziganshin bulat.ziganshin at gmail.com
Tue Apr 11 03:57:16 EDT 2006


Hello Ross,

Monday, April 10, 2006, 8:25:53 PM, you wrote:

> I rather like

>         inits = map ($ []) . scanl (.) id . map (:)

> but this is also competitive:

>         inits = map reverse . scanl (flip (:)) []

it seems that the number of `inits` implementations is close to that's
of `fac` :)


Haskeller, are you wrote you own version of inits?!


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Libraries mailing list