[Haskell-cafe] Foldr tutorial, Inspired by Getting a Fix from a Fold

Bernie Pope bjpop at csse.unimelb.edu.au
Mon Feb 12 16:14:50 EST 2007


Lennart Augustsson wrote:
> Sure, but we also have
>
> para f e xs = snd $ foldr (\ x ~(xs, y) -> (x:xs, f x xs y)) ([], e) xs
Nice one.


More information about the Haskell-Cafe mailing list