Tail Recursion
In this lesson, you will be introduced to Scala's preferred form of recursion: tail recursion.
We already know that in recursion, a function recursively calls itself. A recursive call becomes a recursive tail call when the recursive function calls itself at the very end of the function body, i.e., the tail of the function.
Tail Recursive Functions
Tail recursive functions are iterative processes and are the functional form of a loop. They are an optimized version of ...