
11 Sep
2012
11 Sep
'12
2:51 p.m.
On Tue, Sep 11, 2012 at 11:43 AM, Henning Thielemann
I don't know whether this "scanl'" is of much use. "foldl'" is required because we can access its accumulator only after "foldl'" finished. But in "scanl'" you can and usually should access the interim accumulator values that are contained in the result list.
I use it relatively frequently, e.g. 'intervals = scanl (+) 0 (cycle [2, 1, 2, 2, 1, 2, 2])'