On May 3, 2010, at 20:20 , Stuart Halloway wrote: > Not all the way to a solution, but here is a trivial example that > demonstrates the issue: > > (def x > (loop [ct 0 > s (lazy-seq)] > (if (> ct 10000) > s > (recur (inc ct) (lazy-seq (filter identity s)))))) > > x > => java.lang.StackOverflowError
filter itself is a lazy seq, so if you have a filter and pass it on put a (doall ) around it otherwise you'll have a filter in a filter in a filter ... in a stack overlfow. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en