This repository has been archived on 2022-08-10. You can view files and clone it, but cannot push or open issues or pull requests.
chez-openbsd/ta6ob/examples/fib.ss
2022-08-09 23:28:25 +02:00

10 lines
187 B
Scheme

;;; simple fibonacci function
;;; uses trace-lambda to show the nesting
(define fib
(trace-lambda fib (x)
(if (<= x 1)
1
(+ (fib (- x 1)) (fib (- x 2))))))