3 ms·
Every recursive algorithm can be expressed without recursion. You do not need recursion to simulate a Turing machine and Turing machines can compute every total
by thethirdone 6y ago
Every recursive algorithm can be expressed without recursion. You do not need recursion to simulate a Turing machine and Turing machines can compute every total recursive function.
Generally, it is easy to turn a recursive algorithm into a loop and a stack. Simulating a CPU and running compiled code is one example of running recursive programs while only using a loop.
I wrote a version of the Ackermann function in Brainfuck (a language with only while loops), but sadly I don't know where I left the program.