diff --git a/src/ludus/interpreter.clj b/src/ludus/interpreter.clj index 796e2e0..17b8eff 100644 --- a/src/ludus/interpreter.clj +++ b/src/ludus/interpreter.clj @@ -253,7 +253,7 @@ (n) -> mult (n, fact (sub (n, 1))) } - fact (6) + fib (1) ") @@ -278,6 +278,16 @@ ") +(defn fib [n] + (case n + 0 1 + + 1 1 + + (+ (fib (- n 1)) (fib (- n 2))))) + +(fib 35) +