3 ms·
The Ackermann function I personally find better for recursion since you can't implement it trivially with iteration--it's not primitive recursive. The downside
by jcranmer 10y ago
The Ackermann function I personally find better for recursion since you can't implement it trivially with iteration--it's not primitive recursive. The downside is that it's double-recursive (which can be problematic if you're trying to teach the concept in assembly), and it's not particularly clear why such a function should exist (although one can point out that it's basically a generalization of addition/multiplication/exponentation/tetration to arbitrary degrees).