Tail recursion

From Conservapedia
This is the current revision of Tail recursion as edited by EdBot (talk | contribs) at 21:05, April 1, 2008. This URL is a permanent link to this version of this page.
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.