On 13 June 2010 11:35, Oleg <oleg.richa...@gmail.com> wrote: > Currently i'm just calling function, but there is a danger of > StackOverflow. I can't use recur, because it's not last statement. As > i can understand recur is good to build long sequences, but in my case > i'm building hierarchy.
If you're only recursing to a given depth, why would there be any problem with a stack overflow? You usually have to recurse quite far before you get to the limits of the stack. Otherwise, do what Andrzej suggested, make everything lazy, or use a trampoline. If we could see your current code, it would be easier to provide an example. - James -- 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