Operator Description Example +Addition a + b-Subtraction / negation a - b, -x*Multiplication a * b/Division a / b%Modulo a % b
All comparisons compile to strict equality (===, !==).
Operator Description Compiles to ==Equal ===!=Not equal !==<Less than <>Greater than ><=Less or equal <=>=Greater or equal >=
Operator Description Example &&Logical AND a && b||Logical OR a || b!Logical NOT !a
Operator Description Example |>Pipe x |> f
The pipe operator passes the left side as the first argument to the right side. Use _ as a placeholder for non-first-argument positions.
x |> match { . .. } // match x { ... }
Operator Description Example ?Unwrap Result/Option expr?
The ? operator unwraps Ok(value) or Some(value), and returns early with Err(e) or None on failure. Only valid inside functions that return Result or Option.
Operator Context Meaning fn(x)Closures fn(x) x + 1.fieldDot shorthand .name (implicit field-access closure)->Match arms, return types, function types Ok(x) -> x, fn(string) -> number|>Pipes data |> transform
Unary: !, -
Multiplicative: *, /, %
Additive: +, -
Comparison: <, >, <=, >=
Equality: ==, !=
Logical AND: &&
Logical OR: ||
Pipe: |>
Unwrap: ?