Hännärekursion
Hännärekursion, or tail recursion, is a special case of recursion where the recursive call is the very last operation in a function. This means that after the recursive call is made, no further computation is performed within the current function's scope. This characteristic allows compilers and interpreters to optimize the recursion in a way that mimics iterative execution.
In a standard recursive function, each call adds a new frame to the call stack to store
This optimization, known as tail-call optimization (TCO), effectively prevents the call stack from growing with each