Andrew Lentvorski wrote:
Darren New wrote:
Tracy R Reed wrote:
Andrew Lentvorski wrote:
Summary: Anywhere you would iterate you can also recurse.
I don't believe that is true, but I'd have to think about it.

I believe what you need is unbounded iteration (i.e., while loops) rather than having only bounded iteration (i.e., pascal-style for loops). If your only iteration construct requires you to specify an upper bound, there are things that can't be calculated, like the Ackerman function.

I don't think that's enough.

I'm confused. You don't think what is enough for what?

I think the only places where this breaks is when side effects are the desired result. I'm pretty sure you can interconvert iteration and recursion as long as everything is functional.

Yes, as long as you can use indefinite iteration. Recursion can do more than for loops, but not more than while loops. That's all I'm saying.

--
  Darren New / San Diego, CA, USA (PST)
    I bet exercise equipment would be a lot more
    expensive if we had evolved from starfish.

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to