Re: StackOverflowError possible with seq ?

2010-01-22 Thread mudphone
Hi Robert, I tracked down the source of the StackOverflowError in my code. It boils down to the following similar (to your example) code snippet. Although, on my machine, this example gives the stack overflow, rather than the OOM error. (def acoll (ref [])) (doseq [i (range 1 3000)] (println

Re: StackOverflowError possible with seq ?

2010-01-18 Thread kirschkernkissen
Hi Kyle! I encountered the same problem: (defn stack-fail returns an empty lazy seq [l i] (if ( i 0) (recur (remove #{1} (concat l '(1))) (dec i)) l)) (def foo (stack-fail () 1000)) foo ; Evaluation aborted. if you call a non-lazy function (e.g. doall) on the collection from

Re: StackOverflowError possible with seq ?

2010-01-18 Thread mudphone
Hi Robert, Thanks for your reply! Very interesting. I see what you're saying. But, your code results in a OutOfMemoryError, rather than a StackOverflow. At least, that's what I see on my machine. Are you seeing the same? Is there some way that this same concept could lead to a StackOverflow?