diff --git a/examples/fib.yasi b/examples/fib.yasi index 9eaec32..0dcb66b 100644 --- a/examples/fib.yasi +++ b/examples/fib.yasi @@ -1,11 +1,5 @@ (define (fib n) - (cond - (= n 0) 0 - (= n 1) 1 - (+ - (fib (- n 1)) - (fib (- n 2)) - ) - ) -) -(print "fib(10) = " (fib 10)) + (if (< n 2) n + (+ (fib (- n 1)) + (fib (- n 2))))) +(print "fib(25) = " (fib 25))