<[EMAIL PROTECTED]> wrote:


Jordan,

I calculate the Fibonnacci numbers without recursion using REBOL. For
example

>> fib 100
== 3.54224848179262E+20
>>

How would you calculate it with recursion?

Jerry

fib: func [first second n] [

    either n = 1 [first] [

        either n = 2 [second] [

            fib second first + second n - 1

            ]

        ]

    ]

>> fib 1.0 1.0 100
== 3.54224848179262E+20

Ladislav

Reply via email to