On Dec 1, 2:14 pm, Stuart Sierra wrote:
> 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 build
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 w
On Thu, Dec 1, 2011 at 7:03 AM, John Holland wrote:
> I've been looking into Clojure and now Scheme for a while. Currently
> it's been SICP.
>
> I notice that SICP has examples of recursion such as a binary tree
> builder that is something like the following:
>
> (define (tree top elements split-