scala – function call – recursion tail

What is recursion tail in scala?

‘Recursion’ is a function that calls itself. A function that calls itself, for example, a function ‘A’ calls function ‘B’, which calls the function ‘C’.  It is a technique used frequently in functional programming.

 

In order for a tail recursive, the call back to the function must be the last function to be performed.