Functions
You will learn
The two ways t27 writes a function signature, and the body with return.
fn add(a: u8, b: u8) -> u8 declares a function with two u8 inputs and a u8 result; the body in braces ends with return. The compiler also accepts the Zig style, pub fn add(a: u8, b: u8) u8, without the arrow. There are no generics: fn id<T> is a parse error. The test runner on this site checks constants and does not call functions, so the lesson keeps the expected results as constants beside them.