1
0
Fork 0
forked from koniifer/ableos
ableos-framebuffer/hblang/examples/global_variables.hb

16 lines
202 B
Plaintext
Raw Normal View History

global_var := 10;
complex_global_var := fib(global_var) - 5;
fib := fn(n: int): int {
2024-05-19 11:20:42 -05:00
if 2 > n {
return n;
}
return fib(n - 1) + fib(n - 2);
}
main := fn(): int {
return complex_global_var;
}
2024-05-19 11:20:42 -05:00