XU XUv0.8.8
中文

Docs / Language

Functions

fn add(a int, b int) int {
    << a + b
}

fn (c &mut Counter) inc() {
    c.n += 1
}

Variadic is trailing name <-> T, seen as []T in the body. Errors are not extra return values; they use >> + or.

In expressions << / >> remain shifts; as statements they return / throw. Boolean or is ||; or is errors only. Division by zero and out-of-bounds index fail loud.