[snip]
>The reason for this is that in recursive functions, the stack has a
>very definite pattern to it, where each stack frame is a function of
>the previous frame. If this function is invertible, then you only need
>to store the bottommost stack frame. The rest of the stack can be
>regenerated from this by applying the inverse transformation.

Well, isn't that the case in which you can easily transform recursion to
iteration? There are tasks you can solve with recursion _or_ iteration.

I can only think of big use for this in Prolog, where you used recursion
only.

That would be wonderful if you gave us example where this recursion would be
the best solution.

Karlis


Reply via email to