clone
Some checks failed
Build / build (push) Failing after 1m45s
Test / build (push) Failing after 12m0s

This commit is contained in:
Chuck Smith
2024-03-15 15:35:45 -04:00
parent 2988719c9c
commit 80f1a2d78c
6 changed files with 59 additions and 6 deletions

18
examples/ fibi.monkey Normal file
View File

@@ -0,0 +1,18 @@
let fib = fn(n) {
if (n < 3) {
return 1
}
let a = 1
let b = 1
let c = 0
let i = 0
while (i < n - 2) {
c = a + b
b = a
a = c
i = i + 1
}
return a
}
print(fib(35))

View File

@@ -1,2 +0,0 @@
let a = 0;
let a = a + 1;