Proposal: Strict scanl, scanl1 and mapAccumL
Roman Cheplyaka
roma at ro-che.info
Mon Nov 12 13:44:16 CET 2012
* Henning Thielemann <lemming at henning-thielemann.de> [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.
Roman
More information about the Libraries
mailing list