Difference between revisions of "Tail recursion"
Jump to navigation
Jump to search
(New page: '''Tail recursion''' is a particular type of recursion in which the last operation of a function is a recursive call. Optimization of this type of recursion can be done by executing ...) |
|||
| Line 3: | Line 3: | ||
Optimization of this type of recursion can be done by executing the call in the current stack frame and returning its result, instead of creating a new stack frame. | Optimization of this type of recursion can be done by executing the call in the current stack frame and returning its result, instead of creating a new stack frame. | ||
| − | [[ | + | [[Category:Computer Science]] |
Latest revision as of 21:05, April 1, 2008
Tail recursion is a particular type of recursion in which the last operation of a function is a recursive call.
Optimization of this type of recursion can be done by executing the call in the current stack frame and returning its result, instead of creating a new stack frame.