"Pascal J. Bourguignon" <p...@informatimago.com> writes: > Roland Hutchinson <my.spamt...@verizon.net> writes:
> > Tail recursion can always be turned into an iteration when it is > > executed. > > All recursions can be turned into iterations, before execution. True, but only by simulating the call stack in the iterative code. To my mind that isn't really an iterative algorithm anymore if it ends up simulating the call stack. Tree walks are the canonical example of what can't be done in an iterative fashion without the addition of an explicitly managed stack -- Thomas A. Russ, USC/Information Sciences Institute -- http://mail.python.org/mailman/listinfo/python-list