What is tail-recursion elimination?
Tail call elimination is an optimization that saves stack space. It replaces a function call with a goto. Tail recursion elimination is the same thing, but with the added constraint that the function is calling itself. Basically, if the very last thing a function A does is return A(params…) then you can eliminate the allocation … Read more