summaryrefslogtreecommitdiff
path: root/doc/fib.nxs
diff options
context:
space:
mode:
Diffstat (limited to 'doc/fib.nxs')
-rw-r--r--doc/fib.nxs4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/fib.nxs b/doc/fib.nxs
new file mode 100644
index 0000000..130f99d
--- /dev/null
+++ b/doc/fib.nxs
@@ -0,0 +1,4 @@
+;; Author: Andrei S
+(bind fib (lambda (x) ;; xth fib number
+(if (< x 2) x (+ (fib (- x 1)) (fib (- x 2))))))
+(fib 7)