> 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.
http://www.cs.nott.ac.uk/~gmh/fold.pdf
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.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe