holey-bytes/smh.hb
Jakub Doka 68186ec0ce
supporting translation of all nodes
TODO: handle ABI argument passing

Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
2024-12-29 16:37:24 +01:00

16 lines
165 B
Plaintext

main := fn(): uint {
return fib(10)
}
fib := fn(x: uint): uint {
a := 0
b := 1
loop if x == 0 break else {
c := a + b
a = b
b = c
x -= 1
}
return a
}