3 ms·
I'm having problems finding the examples you mention in the wikipedia article. That notwithstanding, I disagree that either method is "natural." Iteration is ju
by delinka 16y ago
I'm having problems finding the examples you mention in the wikipedia article. That notwithstanding, I disagree that either method is "natural." Iteration is just what they taught you as a child. If we taught recursion instead (specifically for exponents), then that would be the "natural" method.
The point with my C function is that it's certainly simple to do in a non-functional language.