Why this happens?

Santoemma Enrico Enrico.Santoemma at beta80group.it
Tue Apr 19 10:37:13 EDT 2005


I've always thought that compilers for functional languages were able to recognize tail recursion and to transform it into a loop.
So, why this line eats all my machine's memory (and then runs out of stack space)?

sum [1..10000000]  -- ten millions

Enrico


More information about the Glasgow-haskell-users mailing list