When I try to execute this:
> result = foldl (+) 0 [1..100000]
> main = putStr $show (result `mod` 10)
Hugs gives: ERROR: Garbage collection fails to reclaim sufficient space
GHC gives: Stack space overflow: current size 262152 bytes.
Why would this have an error? The list should be constructed lazily as it
is consumed by the sum. I assume I have a space leak but I can't figure
out why.
-Alex-
___________________________________________________________________
S. Alexander Jacobson i2x Media
1-212-697-0184 voice 1-212-697-1427 fax