4 ms·
I think “while loops” are orthogonal to primitive recursive functions.. for example, here’s how to compute the Ackerman function using only recursion in several
by tbenst 5y ago
I think “while loops” are orthogonal to primitive recursive functions.. for example, here’s how to compute the Ackerman function using only recursion in several languages; https://stackoverflow.com/questions/16115815/ackermann-very-inefficient-with-haskell-ghc https://stackoverflow.com/questions/16115815/ackermann-very-...
- H8crilA 5y agoIt doesn't have to be a while loop. Recursion is another way to implement a loop with a priori unknown number of iterations. You can also use goto. And no, they aren't othogonal. A simple language with only integer variables, basic arithmetic, if() and for(i in range(x,y)) is actually not Turing complete.