docs(examples): add example programs

This commit is contained in:
dualfroz committed 2026-08-28 15:50:00 +02:00
1 parent 022cea25e3
commit f72f9d0c29
7 files changed
+200

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
// Recursive Fibonacci, printed for the first ten indices.
fn fib(n) {
if (n < 2) {
return n
}
return fib(n - 1) + fib(n - 2)
}
for (i in range(0, 10)) {
println("fib(" + str(i) + ") = " + str(fib(i)))
}