qse/ase/test/lsp/t5.lsp

9 lines
188 B
Plaintext
Raw Normal View History

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)