Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdearman committed May 18, 2024
1 parent ccdb49d commit 05d8eda
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/mvp.scm
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@
n
(+ (fib (- n 1)) (fib (- n 2)))))

(defn fib (n)
"Compute the nth Fibonacci number."
(defn (fib n)
(if (<= n 1)
n
(+ (fib (- n 1)) (fib (- n 2)))))

(defn fib-iter (n)
"Compute the nth Fibonacci number iteratively."
(defn (fib-iter n)
(let loop ((a 0) (b 1) (i n))
(if (= i 0)
a
Expand Down

0 comments on commit 05d8eda

Please sign in to comment.