|
|
|
|
|
by DonaldPShimoda
2817 days ago
|
|
> Fib is the poster boy for tail recursion But recursive Fibonacci isn't tail recursive. The final function call is to `+` (addition), which means that the two recursive calls must each be put on the stack and later returned so the sum can be computed. Tail recursion requires that there is no final operation other than exactly a single recursive call. |
|