Tail recursion

A recursive call that is the last thing a function does, with nothing left to combine after it returns. A loop can replace it, so the stack stays constant.

Back to the glossary