making a procedure tail-recursive: why
why make a procedure tail-recursive?
- iterative processes use constant space
- recursive processes need space to “remember” the deferred computations
note
- a tree-recursive process (eg, Fibonacci)
may repeat the same computation many times: even worse
cannot be made tail recursive by simple rules