mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
5 lines
106 B
Scheme
5 lines
106 B
Scheme
(define (fib n)
|
|
(let lp ((n n) (a 1) (b 1))
|
|
(if (< n 2)
|
|
a
|
|
(lp (- n 1) (+ a b) a))))
|