summaryrefslogtreecommitdiff
path: root/jni/ruby/sample/fib.scm
blob: d2dc77028210902f1ced1852727038d0a3ce6a68 (plain)
1
2
3
4
5
6
7
8
(define (fib n)
  (if (< n 2)
    n
    (+ (fib (- n 2)) (fib (- n 1)))))

(display (fib 20))
(newline)
(quit)