summaryrefslogtreecommitdiff
path: root/doc/fib.nxs
diff options
context:
space:
mode:
authorPreston Pan <preston@nullring.xyz>2023-01-06 20:48:56 -0800
committerPreston Pan <preston@nullring.xyz>2023-01-06 20:48:56 -0800
commitc620d528fb9d9efbac559002d23857623e71df05 (patch)
treed8d6ee788cc4688a3c4a4401906fe3ce25307855 /doc/fib.nxs
parent0771dd0e1a143c17920d65d5de8d010aa433ce1c (diff)
whoops, fixed concat. Include in the making
Diffstat (limited to 'doc/fib.nxs')
-rw-r--r--doc/fib.nxs6
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/fib.nxs b/doc/fib.nxs
index 130f99d..e09e7a4 100644
--- a/doc/fib.nxs
+++ b/doc/fib.nxs
@@ -1,4 +1,8 @@
;; Author: Andrei S
(bind fib (lambda (x) ;; xth fib number
-(if (< x 2) x (+ (fib (- x 1)) (fib (- x 2))))))
+ (if (< x 2) x (+ (fib (- x 1)) (fib (- x 2))))))
+
(fib 7)
+
+(bind fibseq (lambda (n)
+(if (= 0 n) 0 (begin (+ n 1) (fib n)))))