From: Michael Campbell Date: 2002-11-07T07:08:57+09:00 Subject: Re: tail recursion --- Mirian Crzig Lennox wrote: > Greetings, Ruby hackers! > > I have a small implementation question: does Ruby support tail > recursion optimisation a la Scheme? e.g, if I write the following: > > def factorial x > fail if x < 1 > (x == 1) ? x : x * factorial(x - 1) > end > > Am I going to get at most one stack frame or zillions? zillions, depending on x, I believe. ===== -- Yahoo IM: michael_s_campbell __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/