From: Joel VanderWerf Date: 2003-03-14T00:44:38+09:00 Subject: Re: Recursion MikkelFJ wrote: > "Daniel Carrera" wrote in message > news:20030313010257.GA3381@math.umd.edu... > >>You mean, like this? : >> >># Compute the Greatest Common Divisor. >>def gcd(a,b) >> return a if b == 0 >> return gcd(b, a % b) >>end >> >>On Thu, Mar 13, 2003 at 09:57:25AM +0900, Mattia Peronio wrote: >> >>>Please, I need an example of recursive function with 2 or more >>>parameters, i.e. the euclidean formula for maximum common divisor. >>>thank you very much, >>>Mattia > > > May I suggest that we do not directly solve what appears to be home > assignments? Indeed. And as a punishment for this offense, the offending party should write out the decimal represenatation of A(5, 5) where A(0, n) = n + 1 A(m+1, 0) = A(m, 1) A(m+1, n+1) = A(m, A(m+1, n)) (Ackermann's function) Oops. Now I guess I gotta do it, too ;)