Auk writes a function's return type after a colon, like every other type annotation:
fn add(a: int, b: int): int. The -> arrow from Rust, Python or Swift is rejected (with a fix).
Wrong#
fn add(a: int, b: int) -> int = a + bFixed#
fn add(a: int, b: int): int = a + bCommon causes#
- Habit from Rust, Python type hints or Swift.
- Function types in parameters are written
(int) => int, notint -> int.