The problem occurs when the result value is needed and thus the thunks need to be reduced, starting with the outermost, which can't be reduced without reducing the next one .... etc and it's these reduction steps that are pushed on the stack until its size cause a stack-overflow.

Yes, that's exactly right, and something that's not often pointed out.

Edsko
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to