[Haskell-cafe] Re: Foldr tutorial,
Inspired by Getting a Fix from a Fold
lennart at augustsson.net
Mon Feb 12 17:39:36 EST 2007
I thought solution one was missing the ~ ?
On Feb 12, 2007, at 22:07 , apfelmus at quantentunnel.de wrote:
> Bernie Pope wrote:
>> 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.
> "Nice one" is an euphemism, it's exactly solution one :)
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe