http://qs321.pair.com?node_id=257846


in reply to Iterative vs Recursive Processes

I may be missing some deeper nested (no pun intended :) point, but how is your factorial_iterative() interative? Inside you simply make a call to fi_helper() which is a recursive subroutine.

An interative routine would be the one which didn't make a call to itself and instead used loops to complete the task (as some of other commenters already did).

(ps: the subject of this thread is great and I enjoyed reading both your and other monks' posts :)

update: mvaline, ahh that makes sense now ;-) Thanks for your reply.

_____________________
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce
the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true."

Robert Wilensky, University of California