Core Beginner
01 Functions
Implement small functions. The final expression in a block, written without a semicolon, is the value the function returns.
Implement is_even so it returns true when n is even.
Hints
n % 2 == 0is already abool-- return it directly.
Reveal solution
fn is_even(n: i32) -> bool {
n % 2 == 0
}