infix (cont)

Documentation for infix (cont), assembled from the following types:

language documentation Sets, Bags, and Mixes

From Sets, Bags, and Mixes

(Sets, Bags, and Mixes) infix (cont)

multi sub infix:<(cont)>(Any $a$b --> Bool)
multi sub infix:<(cont)>(Set $a$b --> Bool)

Contains operator.

Returns True if $a contains $b as an element.

say (123).Set (cont) 2;              # OUTPUT: «True␤» 
say (123).Set (cont) 4;              # OUTPUT: «False␤» 

infix ∋

only sub infix:<>($a$b --> Bool)

Contains operator (alternate).

Equivalent to (cont), at codepoint U+220B (CONTAINS AS MEMBER).

infix ∌

only sub infix:<>($a$b --> Bool)

Does not contain operator.

Equivalent to !(cont), i.e., returns True if $a does not contain $b, at codepoint U+220C (DOES NOT CONTAIN AS MEMBER).

say (123).Set !(cont) 2;             # OUTPUT: «False␤» 
say (123).Set !(cont) 4;             # OUTPUT: «True␤»