mukesh tiwari <mukeshtiwari.iiitm@gmail.com> writes:
> It seems like the sum function is causing the stack overflow[1].
Graham Gill <math.simplex@gmail.com> writes:`Real World Haskell' actually has a warning regarding the use of
> I think the problem is with laziness in the accumulator of "sum".
> The prelude "sum" is defined as
Prelude's foldl, the space leaks in causes and how to force evaluation
using `seq' in Chapter 4 under the headings `Left Folds, Laziness, and
Space Leaks' and `Avoiding Space Leaks with seq'. It just slipped my
mind, and I had the wrong assumption of the `sum' function.