News for hackers. Stuff that matters.
Re:Thinking About Recursion by thethirdone on Sunday October 11, 2020 @09:11AM (#24745523)
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.

There are no comments on this comment yet.