
20 Mar
2009
20 Mar
'09
8:43 a.m.
Günther Schmidt
Apparently it is the evaluation of this huge build-up that causes the stack-overflow but not the thunk-build-up *as such*.
Do I understand this correctly?
I think that is correct. Prelude> foldl (+) 0 [1..1000000] *** Exception: stack overflow Prelude> foldl const 0 [1..1000000] 0 Prelude> foldl (flip const) 0 [1..1000000] 1000000 -k -- If I haven't seen further, it is by standing in the footprints of giants