The unary operators are used to negate expressions. The unary
- (minus) operator yields the negation of its numeric argument. The unary
~ (invert) operator yields the bitwise inversion of its integer argument. The unary
not operator yields the inversion of its boolean argument.
let x: bool = not true # false let y: i256 = -1 # -1 let y: i256 = ~1 # -2