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 believe that the Y combinator allows you
to handle indefinite recursions, as well. And, if that isn't enough,
continuations should get you the rest of the way.
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.
-a
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg