2005-09-20 12:06:51 +00:00
|
|
|
; Compute the N'th Fibonacci number.
|
|
|
|
(defun fibonacci (N)
|
2006-11-02 11:10:49 +00:00
|
|
|
;(if (or (zerop N) (= N 1))
|
|
|
|
(if (or (= N 0) (= N 1))
|
2005-09-20 12:06:51 +00:00
|
|
|
1
|
|
|
|
(+ (fibonacci (- N 1)) (fibonacci (- N 2)))))
|
|
|
|
|
|
|
|
(fibonacci 5)
|