This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Another java.lang.StackOverflowError


> The OutOfMemoryError is not my concern. My problem lies in the
> foldl-seq implementation, which results in StackOverflowError
> very early. 

Not sure I understand, since the iterative foldl does clearly work
without a stack overflow.  Your foldl-seq is not tail recursive when
calling the resultant (initial).

>    (let loop (....)
>         ...
>         (loop .....))

This does work.  But the "..." sections must also be tail-recursive.

Regards,
Chris Dean


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]