Adding scanl'

Ben Millwood haskell at
Tue Sep 11 23:23:59 CEST 2012

On Tue, Sep 11, 2012 at 8:24 PM, Niklas Hambüchen <mail at> wrote:
> As a side note:
> Data.List.sum [1..100000000] eats all my memory in my ghci.
> Why does it use foldl, not foldl'?

Strictly* speaking, it's possible for (+) to be lazy in its
parameters; in any case, if you compile with optimisations you may
find the memory leak goes away.

* No pun intended.

More information about the Libraries mailing list