Hello David, Thursday, December 29, 2005, 3:42:05 AM, you wrote:
>> stats elems = foldl add_elem Map.empty elems DR> This program has a space leak and runs out of stack space. I'm guessing DR> that I'm being bit here by an unnatural amount of laziness in DR> Map.insertWith stack overflows AFAIK is never occur because of laziness, but only because your recursion is not tail-optimized. as Udo says, problem may be fixed by using proper fold. if foldl' will not work - try to write your own, explicit looping scheme -- Best regards, Bulat mailto:[EMAIL PROTECTED] _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe