Tree-building functions are not usually tail-recursive. I'm not even sure that Scheme will do tail-call elimination in that case. The Java stack can hold 8000 frames or so, so log base 2 is probably small enough to avoid a stack overflow when building a tree.
You could probably rewrite this with loop/recur, but I don't have time to work it out just now. -S -- 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