
13 Sep
2012
13 Sep
'12
7:18 p.m.
On 9/12/12 2:30 PM, Niklas Hambüchen wrote:
Was it intentional that sum is defined in terms of foldl and not foldl'?
Yes, because sum is defined in the Report as using foldl. This is silly, but it is what it is. With optimizations on, GHC often converts foldl into foldl' (when it's semantics-preserving) because of this and other functions which "must" use foldl. -- Live well, ~wren