From: Dave Bass Date: 2008-07-01T06:41:03+09:00 Subject: Re: Recursive Logic - Examples and Resources? Dan __ wrote: > Now, I know enough to figure out that I need some recursion here For those of us who dislike recursion*, it may be worth pointing out that anything you can do with recursion, you can also do with iteration and a stack. Dave ----- * I've never been able to get my head around recursion. Does that make me a bad person, or just a stupid idiot? (Probably the second.) I can't see how recursion lines up with the principle of keeping things simple; it seems like a recipe for complexity and potential disaster to me. A stack, on the other hand, is eminently visualisable and understandable, and it's pretty trivial to ensure the stack doesn't grow beyond some predefined size. And everyone loves iteration. But millions of computer scientists can't be wrong... can they? -- Posted via http://www.ruby-forum.com/.