From: Philipp Meier Date: 2002-07-09T00:55:37+09:00 Subject: Re: Right recursive --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 09, 2002 at 12:04:19AM +0900, Juergen Katins wrote: >=20 > "Kontra, Gergely" wrote >=20 > > I learnt about right recursiveness. > > Eg. the fib function: > > > > fib0 n, acc > > if n>0 > > fib0 n-1, n*acc > > else > > acc > > end > > end > > > > def fib n > > fib0 n, 1 > > end > > >=20 > I don't know the correct formula for right recursion of fibunacci numbers, > but this one is > false (fib 7 should be 13, not 720). The given function calculate n! not the fibonacci numbers. -billy. --=20 Meisterbohne S=F6flinger Stra=DFe 100 Tel: +49-731-399 499-0 eL=F6sungen 89077 Ulm Fax: +49-731-399 499-9 --vkogqOf2sHV7VnPd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9KbXwfBriNoqItSYRAv6lAJ9nUeZ86ZuSDPSfDNTzDFyAgt4xOQCcCZPN qIpKz1u1Uw4yf5SgMft1Jao= =3ok2 -----END PGP SIGNATURE----- --vkogqOf2sHV7VnPd--