[Haskell-cafe] Re: Would you mind explain such a code ?

oleg at okmij.org oleg at okmij.org
Thu Sep 10 03:58:22 EDT 2009

> I know myFoldl implements foldl using foldr. However i really donot know how
> it can do it ?

You will probably like

	Graham Hutton
	A Tutorial on the Universality and Expressiveness of Fold
	JFP, 1999.

Section 5.1 (actually, suml in Section 5) of the paper explains how
the expression of foldl in terms of foldr can be _calculated_. The
result is correct by construction.

More information about the Haskell-Cafe mailing list