[Haskell-cafe] Stack Overflow, tail recursion and CPS

Günther Schmidt redcom at fedoms.com
Wed Jan 14 12:30:48 EST 2009

Hi Eugene,

tried that, but since the action to be evaluated is the insertion into a  
structure that won't work.

The strictness here doesn't go deep enough, it stopps short.


Am 14.01.2009, 18:27 Uhr, schrieb Eugene Kirpichov <ekirpichov at gmail.com>:

> Use foldl' ?
> 2009/1/14 Günther Schmidt <redcom at fedoms.com>:
>> Hi all,
>> I get a stack overflow when I want to insert a huge, lazy list into a  
>> Map.
>> I have changed the insertion algo to use foldl to make it  
>> tail-recursive but
>> still get a stack overflow as the "insert" remains lazy.
>> Could CPS be a solution in these cases?
>> Günther
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe

Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/

More information about the Haskell-Cafe mailing list