[Haskell-cafe] Proof of duality theorem of fold?

Daniel Fischer daniel.is.fischer at web.de
Wed Mar 18 08:17:59 EDT 2009


Am Mittwoch, 18. März 2009 13:10 schrieb Daniel Fischer:
> Now prove the
>
> Lemma:
>
> foldl g e (ys ++ zs) = foldl g (foldl g e ys) zs
>
> for all g, e, ys and zs of interest.
> (I don't see immediately under which conditions this identity could break,
> maybe there aren't any)

Of course, hit send and you immediately think of

foldl (flip const) whatever (undefined ++ [1,2,3])


More information about the Haskell-Cafe mailing list