[Haskell-cafe] *GROUP HUG*
dons00 at gmail.com
Thu Jun 2 01:15:53 CEST 2011
Thank Graham Hutton and Richard Bird.
On Wed, Jun 1, 2011 at 7:12 PM, Tom Murphy <amindfv at gmail.com> wrote:
>> How about this:
>> myFoldr :: (a -> b -> b) -> b -> [a] -> b
>> myFoldr f z xs = foldl' (\s x v -> s (x `f` v)) id xs $ z
> Great! Now I really can say "Come on! It's fun! I can write foldr with foldl!"
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe