This commit is contained in:
Chuck Smith
2024-01-22 20:52:58 -05:00
parent ed4d23de2d
commit 423027cda0
3 changed files with 65 additions and 0 deletions

11
examples/fib.monkey Normal file
View File

@@ -0,0 +1,11 @@
let fib = fn(x) {
if (x == 0) {
return 0
}
if (x == 1) {
return 1
}
return fib(x-1) + fib(x-2)
}
puts(fib(35))