Documentation for infix ~~

Documentation for infix ~~, assembled from the following types:

language documentation Operators

From Operators

(Operators) infix ~~

The smart-match operator. Aliases the left-hand side to $_, then evaluates the right-hand side, and calls .ACCEPTS($_) on it. The semantics are left to the type of the right-hand side operand.

Here is an excerpt of built-in smart-matching functionality:

Right-hand side Comparison semantics
Mu:U type check
Str string equality
Numeric numeric equality
Regex regex match
Callable boolean result of invocation
Set/Bag equal element values
Any:D object identity