
24 Jul
2012
24 Jul
'12
1:21 p.m.
On 12-07-23 10:52 PM, Qi Qi wrote:
Foldl has the space leak effect, and that's why foldl' has been recommended.
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. Perhaps it is an intuition leak, not a space leak. That is, one of them fulfills your intuition, the other fails your intuition.