What is tail recursion?
First, let’s understand “tail calls” in a function, where you call another function at the tail end. A tail recursion is where you do as many calculations first as you can, then call the same function again (recursion). So what’s the big deal? The advantage is that in tail recursion, the “stack” from past calls doesn’t have to be remembered. We are passing the results up to this point, to the next call.
For more details:
This StackOverflow question has great responses and explanation.
http://stackoverflow.com/questions/33923/what-is-tail-recursion











