Proposal: Strict scanl, scanl1 and mapAccumL

Roman Cheplyaka roma at
Mon Nov 12 13:44:16 CET 2012

* Henning Thielemann <lemming at> [2012-11-12 13:25:56+0100]
> >In case your accumulator is a Map you really want to use foldl'.
> Why not a deepseq foldl'?

First, you may actually want your Map to contain lazy values.

Second, you may know that your values are already evaluated, so
deepseq is just a waste of time. deepseq is far from being cheap, since 
it has to traverse the whole structure, regardless of what has been
already evaluated.


More information about the Libraries mailing list