September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
8
Task/Fibonacci-sequence/XLISP/fibonacci-sequence-3.xlisp
Normal file
8
Task/Fibonacci-sequence/XLISP/fibonacci-sequence-3.xlisp
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
(defun fibonacci (x)
|
||||
(defun fib (a b n)
|
||||
(if (= n 2)
|
||||
b
|
||||
(fib b (+ a b) (- n 1)) ) )
|
||||
(if (< x 2)
|
||||
x
|
||||
(fib 1 1 x) ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue