Skip to content
This repository was archived by the owner on Sep 7, 2025. It is now read-only.

Commit 993cc62

Browse files
authored
add fibonacci in racket
1 parent f0c6f16 commit 993cc62

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

math/fibonacci.rkt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
(define (fibonacci n)
2+
(cond
3+
[(= n 0) 0]
4+
[(= n 1) 1]
5+
[else (+ (fibonacci (- n 1))
6+
(fibonacci (- n 2)))]))

0 commit comments

Comments
 (0)