Content deleted Content added
→Tail recursive function: Main article link |
|||
Line 93:
===Tail recursive function===
{{main|Tail recursion}}
A function executes a number of tests and then if a certain test is true returns a certain value. If all tests evaluated as false, the function calls it self recursively on reduced input value. In tail recursive functions, the return value of last function call is the return value of the whole recursion. The template in [[Common Lisp]] would be:
|