Skip to content

Commit

Permalink
refactor: code organization in fib.yasi example
Browse files Browse the repository at this point in the history
  • Loading branch information
mrunix00 committed Mar 2, 2024
1 parent c4b5955 commit 3757d3e
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions examples/fib.yasi
Original file line number Diff line number Diff line change
@@ -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))

0 comments on commit 3757d3e

Please sign in to comment.