more examples

This commit is contained in:
Neemek 2026-07-15 21:50:23 +02:00
parent c5a843ea39
commit 9003149114
Signed by: neemek
GPG key ID: 84FFE4D7D40AB25E
19 changed files with 287 additions and 0 deletions

20
examples/blemish.ang Normal file
View file

@ -0,0 +1,20 @@
fn fib(n: int) -> int {
if n < 2 {
n
} else {
fib(n-1) + fib(n-2)
}
}
println(fib(2))
fn other(n: int) -> int {
if n <= 0 {
n
} else {
println(n)
(n - 1)
}
}
println(other(2))