On Sep 19, 2010, at 3:45 PM, Shantanu Kumar wrote: > I simulated a similar recursive call and found it > throws StackOverflowError at 5508 levels deep on a 32-bit Sun JVM (not > server mode) on Windows 7.
Did your similar recursion include the lazy-seq form that wraps the (apparently) recursive call? Each invocation of lazy-seq results in one call to the code it wraps that's delayed until its value is requested. The invocations do not end up nested on the stack. Instead they are executed one by one as calling code steps through the lazy sequence. --Steve -- 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