Tail Call Optimization In Elixir
A tail-recursive function executes itself as the last thing.
def fun(...) do
...
fun(...)
end
Elixir optimizes tail calls by reusing the last stack frame of the function, thus avoiding the typical stack push and reducing the overhead of crea...
ermanimer.hashnode.dev2 min read