holey-bytes/hblang/examples/functions.hb

15 lines
154 B
Plaintext
Raw Normal View History

2024-05-11 09:04:13 -05:00
2024-05-11 15:22:08 -05:00
main := fn(): int {
2024-05-11 09:04:13 -05:00
return add_one(10) + add_two(20);
}
2024-05-11 15:22:08 -05:00
add_two := fn(x: int): int {
2024-05-11 09:04:13 -05:00
return x + 2;
}
2024-05-11 15:22:08 -05:00
add_one := fn(x: int): int {
2024-05-11 09:04:13 -05:00
return x + 1;
}