Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Scheme > Re: Is this tai...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 4582 of 4790
Post > Topic >>

Re: Is this tai-recursion?

by Vend <vend82@[EMAIL PROTECTED] > Jul 2, 2008 at 04:51 AM

On 2 Lug, 13:50, Vend <ven...@[EMAIL PROTECTED]
> wrote:
> On 30 Giu, 13:42, defn noob <circularf...@[EMAIL PROTECTED]
> wrote:
>
> > is this tail-recursion or iteration?
>
> > (define (fib n)
> >   (define (fibs a b n)
> >     (if (<= n 1)
> >         b
> >         (fibs b (+ a b) (- n 1))))
> >   (if (= n 0)
> >       0
> >       (fibs 0 1 n)))
>
> Yes.

I mean, it's tail recursion.
 




 4 Posts in Topic:
Re: Is this tai-recursion?
Vend <vend82@[EMAIL PR  2008-07-02 04:51:10 
Re: Is this tai-recursion?
pjb@[EMAIL PROTECTED] (P  2008-07-02 17:55:34 
Re: Is this tai-recursion?
=?ISO-8859-1?Q?Ois=EDn_Ma  2008-07-08 10:49:37 
Re: Is this tai-recursion?
Vend <vend82@[EMAIL PR  2008-07-09 09:18:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 9:14:24 CDT 2008.