Skip to content

Commit

Permalink
updated fibbo example
Browse files Browse the repository at this point in the history
  • Loading branch information
hscells committed Oct 19, 2015
1 parent 2cb2b20 commit 43cf621
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/fibbo.zap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; demonstration of a recursive function
(fn fib (n)
((cond
((<= n 1) (+ n 0))
((= 1 1) (+ (fib (- n 1)) (fib (- n 2)))))))
(cond
((<= n 1) (return n))
(True (+ (fib (- n 1)) (fib (- n 2))))))

(println (fib 10))

0 comments on commit 43cf621

Please sign in to comment.