Once I needed to reimplement recursion in mathlab because the stack was too small, it was an interesting experience, I had a matrix-repurposed-as-stack and did all the push&#x2F;pop manually while the recursion ran as a loop - goes to show that recursion isn&#x27;t that essential if one knows how to split state, data and code properly.