time complexity of recursive fibonacci code example
Example: recursive fibonacci scheme
(define (fib2 n)
(let loop
((m 0)
(k 1)
(count n))
(if (= count 0)
m
(loop k (+ m k) (- count 1)))))
(define (fib2 n)
(let loop
((m 0)
(k 1)
(count n))
(if (= count 0)
m
(loop k (+ m k) (- count 1)))))