Demo changes
Some checks failed
Build / build (push) Successful in 2m1s
Test / build (push) Failing after 11m48s

This commit is contained in:
Chuck Smith
2024-03-18 20:00:14 -04:00
parent ca4eed10b8
commit 0b1ed43ae5
12 changed files with 171 additions and 111 deletions

View File

@@ -40,4 +40,4 @@ let map = fn(arr, f) {
};
let numbers = [1, 1 + 1, 4 - 1, 2 * 2, 2 + 3, 12 / 2];
map(numbers, fibonacci);
//map(numbers, fibonacci);

8
examples/fact.monkey Normal file
View File

@@ -0,0 +1,8 @@
let fact = fn(n) {
if (n == 0) {
return 1
}
return n * fact(n - 1)
}
print(fact(5)

8
examples/factt.monkey Normal file
View File

@@ -0,0 +1,8 @@
let fact = fn(n, a) {
if (n == 0) {
return a
}
return fact(n - 1, a * n)
}
print(fact(5, 1))

1
examples/hello.monkey Normal file
View File

@@ -0,0 +1 @@
print("Hello World!")