Recent Posts

Recent Comments

Archives

Categories

Meta

recursion

Sorry, Posts you requested could not be found...

Tail recursion in Python
NewsPythonrecursion

Tail recursion in Python

Some programming languages are tail-recursive, essentially this means is that they're able to make optimizations to functions that return the result of calling themselves. That is, the function returns only a call to itself. Confusing, I know, but stick with me. It turns out that most recursive functions can be reworked into the tail-call form.…