foldr f (head xs) xs is not the same as foldr1 f xs

Tomasz Zielonka tomasz.zielonka at gmail.com
Sun May 8 14:26:48 EDT 2005


On Sun, May 08, 2005 at 08:14:30PM +0200, David Sabel wrote:
> Hi!
>
> Subject: foldr f (head xs) xs  is not the same as foldr1 f xs

I think you forgot about tail: 

foldr f (head xs) (tail xs)

Best regards
Tomasz


More information about the Glasgow-haskell-users mailing list