Skip to content

Commit c4712fd

Browse files
committed
Add infix C«(<)», infix C«⊂», infix C«⊄» to operators
1 parent 8b23372 commit c4712fd

File tree

1 file changed

+35
-24
lines changed

1 file changed

+35
-24
lines changed

doc/Language/operators.pod6

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,6 +2247,41 @@ C<!(cont)>.
22472247
22482248
C«» is codepoint U+220C (DOES NOT CONTAIN AS MEMBER).
22492249
2250+
=head2 infix C«(<)», infix C«»
2251+
2252+
multi sub infix:<(<)>($a,$b --> Bool:D)
2253+
multi sub infix:<⊂>($a,$b --> Bool:D)
2254+
2255+
X<Subset of operator>.
2256+
2257+
Returns C<True> if C<$a> is a B<strict subset> of C<$b>, i.e., that all the
2258+
elements of C<$a> are elements of C<$b> but C<$a> is a smaller set than C<$b>.
2259+
2260+
=begin code
2261+
say (1,2,3) (<) (2,3,1); # OUTPUT: «False␤»
2262+
say (2,3) (<) (2,3,1); # OUTPUT: «True␤»
2263+
say 4 ⊂ (1,2,3); # OUTPUT: «False␤»
2264+
=end code
2265+
2266+
C«» is equivalent to C«(<)», at codepoint U+2282 (SUBSET OF).
2267+
2268+
=head2 infix C«»
2269+
2270+
multi sub infix:<⊄>($a,$b --> Bool:D)
2271+
2272+
X<Not a subset of operator>.
2273+
2274+
Returns C<True> if C<$a> is B<not> a C<strict subset> of C<$b>. Equivalent to
2275+
C«!(<)».
2276+
2277+
=begin code
2278+
say (1,2,3) ⊄ (2,3,1); # OUTPUT: «True␤»
2279+
say (2,3) ⊄ (2,3,1); # OUTPUT: «False␤»
2280+
say 4 !(<) (1,2,3); # OUTPUT: «True␤»
2281+
=end code
2282+
2283+
C«» is codepoint U+2284 (NOT A SUBSET OF).
2284+
22502285
=head1 Tight AND precedence
22512286
22522287
=head2 infix C«&&»
@@ -3216,30 +3251,6 @@ Alternate X<neither subset of nor equal to operator>, at codepoint U+2288
32163251
32173252
Equivalent to C«!(<=)».
32183253
3219-
=head3 infix (<)
3220-
3221-
X<Subset of operator>.
3222-
3223-
Returns C<True> if C<$a> is a B<strict subset> of C<$b>.
3224-
3225-
=head3 infix ⊂
3226-
3227-
Alternate X<subset of operator>, at codepoint U+2282 (SUBSET OF).
3228-
3229-
Equivalent to L«(<)».
3230-
3231-
=head3 infix !(<)
3232-
3233-
X<Not a subset of operator>.
3234-
3235-
Returns C<True> if C<$a> is a B<not a strict subset> of C<$b>.
3236-
3237-
=head3 infix ⊄
3238-
3239-
Alternate X<not a subset of operator>, at codepoint U+2284 (NOT A SUBSET OF).
3240-
3241-
Equivalent to C«!(<)».
3242-
32433254
=head3 infix (>=)
32443255
32453256
X<Superset of or equal to operator>.

0 commit comments

Comments
 (0)