68186ec0ce
TODO: handle ABI argument passing Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
16 lines
165 B
Plaintext
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
|
|
}
|