Whilst starting to learn lisp, I\'ve come across the term tail-recursive. What does it mean exactly?
There are two basic kinds of recursions: head recursion and tail recursion.
In head recursion, a function makes its recursive call and then performs some more calculations, maybe using the result of the recursive call, for example.
In a tail recursive function, all calculations happen first and the recursive call is the last thing that happens.
Taken from this super awesome post. Please consider reading it.