24 lines
309 B
Plaintext
24 lines
309 B
Plaintext
unit hello;
|
|
|
|
fn add(a: i32, b: i32) -> i32 {
|
|
return a + b;
|
|
}
|
|
|
|
fn is_answer(value: i32) -> bool {
|
|
return value == 42;
|
|
}
|
|
|
|
fn touch() {
|
|
return;
|
|
}
|
|
|
|
pub fn main() -> i32 {
|
|
touch();
|
|
let value: i32 = add(20, 22);
|
|
if is_answer(value) {
|
|
return 0;
|
|
} else {
|
|
return 1;
|
|
}
|
|
}
|