On 12-07-25 09:06 AM, Mathieu Boespflug wrote:
"Albert Y. C. Lai" <tre...@vex.net> writes:
foldr (+) and foldl (+) for Int have the same asymptotic costs, both
time and space. See my http://www.vex.net/~trebla/haskell/lazy.xhtml
Therefore, I do not understand why they are labeled opposite space-leakness.
That may be true, but if the function argument supplied to foldr is lazy
in its second argument, then the story can be quite different.
In my http://www.vex.net/~trebla/haskell/lazy.xhtml which I mentioned
yesterday, I have an example for that, too. foldr (||).
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe