edlang/programs/example.ed
2024-01-15 21:36:53 +01:00

20 lines
313 B
Plaintext

mod Main {
fn add(a: i32, b: i32) -> i32 {
return a + b;
}
fn check(a: i32) -> i32 {
if a == 2 {
return a;
} else {
return 0;
}
}
fn main() -> i32 {
let x: i32 = 2 + 3;
let y: i32 = add(x, 4);
return y;
}
}