Re: Any way to tail-recurse this?



Thanks - I hope I'm learning a little something here. Tell me - why
is it a waste to keep the accumulator in the data structure (albeit
cunning, as you mentioned), and what is the advantage of the way you
do it?

Again, thanks.

(It is quite difficult to get the "hang" of this "thinking
recursively," but I'm trying, and at least I did come up with a
recursive solution, albeit an ugly one, heh)

.



Relevant Pages