slige/examples/add_fn.slg

15 lines
147 B
Plaintext
Raw Permalink Normal View History

2024-12-11 00:22:13 +01:00
2024-12-11 03:11:00 +01:00
fn main() -> int {
2024-12-11 00:22:13 +01:00
add(1, 2)
}
fn add(a: int, b: int) -> int {
2024-12-11 03:11:00 +01:00
let c = a;
let d = b;
{
let a = c;
2024-12-12 15:37:56 +01:00
a + d
2024-12-11 03:11:00 +01:00
}
2024-12-11 00:22:13 +01:00
}
2024-12-11 12:36:19 +01:00