Re:How recursion got into Algol 60: a comedy of errors
by pbsd on Thursday August 27, 2015 @09:34PM
(#10133263)
Basically equivalent to this C code (assuming BSR = procedure call):
[ Parent
| on HN ]
Re:How recursion got into Algol 60: a comedy of errors
by bbcbasic on Thursday August 27, 2015 @10:56PM
(#10133516)
Hmm. How is this recursion?
Maybe I don't understand what the word recursion means, but I thought that you'd have to call yourself directly or indirectly.
Re:How recursion got into Algol 60: a comedy of errors
by LesZedCB on Thursday August 27, 2015 @11:23PM
(#10133587)
It's not recursion in the sense that it calls itself. However, it does divide the problem into smaller (though explicitly defined) chunks, which is still recursion.
You could state it that the multiple by a power of two is the sum of the multiples of one order of magnitude base 2 lower.
Re:How recursion got into Algol 60: a comedy of errors
by ScottBurson on Friday August 28, 2015 @12:04AM
(#10133683)
You're right. This isn't recursion by any definition I know. Cute, though.
Re:How recursion got into Algol 60: a comedy of errors
by bbcbasic on Friday August 28, 2015 @05:10AM
(#10134401)
Yes from the answers it seems it is recursion, as long as you stretch the definition of recursion to mean making subroutine calls, or code that can be refactored into a recursive solution.
By these definitions, all but the most trivial code is recursive.