Skip to content

Commit 932d992

Browse files
committed
Add infix C«(>)», infix C«⊂», infix C«⊅» to operators
1 parent 863ebf0 commit 932d992

File tree

1 file changed

+35
-25
lines changed

1 file changed

+35
-25
lines changed

doc/Language/operators.pod6

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,6 +2318,41 @@ C«!(<=)».
23182318
23192319
C«» is codepoint U+2288 (NEITHER A SUBSET OF NOR EQUAL TO).
23202320
2321+
=head2 infix C«(>)», infix C«»
2322+
2323+
multi sub infix:<(>)>($a,$b --> Bool:D)
2324+
multi sub infix:<⊃>($a,$b --> Bool:D)
2325+
2326+
X<Superset of operator>.
2327+
2328+
Returns C<True> if C<$a> is a B<strict superset> of C<$b>, i.e., that all the
2329+
elements of C<$b> are elements of C<$a> but C<$a> is a larger set than C<$b>.
2330+
2331+
=begin code
2332+
say (1,2,3) (>) (2,3,1); # OUTPUT: «False␤»
2333+
say (1,2,3) (>) (2,3); # OUTPUT: «True␤»
2334+
say 4 ⊃ (1,2,3); # OUTPUT: «False␤»
2335+
=end code
2336+
2337+
C«» is equivalent to C«(>)», at codepoint U+2283 (SUPERSET OF).
2338+
2339+
=head2 infix C«»
2340+
2341+
multi sub infix:<⊅>($a,$b --> Bool:D)
2342+
2343+
X<Not a superset of operator>.
2344+
2345+
Returns C<True> if C<$a> is B<not> a C<strict superset> of C<$b>. Equivalent to
2346+
C«!(>)».
2347+
2348+
=begin code
2349+
say (1,2,3) ⊅ (2,3,1); # OUTPUT: «True␤»
2350+
say (1,2,3) ⊅ (2,3); # OUTPUT: «False␤»
2351+
say 4 !(>) (1,2,3); # OUTPUT: «True␤»
2352+
=end code
2353+
2354+
C«» is codepoint U+2285 (NOT A SUPERSET OF).
2355+
23212356
=head1 Tight AND precedence
23222357
23232358
=head2 infix C«&&»
@@ -3285,31 +3320,6 @@ Alternate X<neither a superset of nor equal to operator>, at codepoint U+2289
32853320
32863321
Equivalent to C«!(>=)»,
32873322
3288-
=head3 infix (>)
3289-
3290-
X<Superset of operator>.
3291-
3292-
Like L«(<)» with reversed arguments. Returns C<True> if C<$a> is a
3293-
B<strict superset> of C<$b>.
3294-
3295-
=head3 infix ⊃
3296-
3297-
Alternate superset of operator, at codepoint U+2283 (SUPERSET OF).
3298-
3299-
=head3 infix !(>)
3300-
3301-
X<Not a superset of operator>.
3302-
3303-
Like L«(<)» with reversed logic. Returns C<True> if C<$a> is B<not a strict
3304-
superset> of C<$b>
3305-
3306-
=head3 infix ⊅
3307-
3308-
Alternate X<not a superset of operator>, at codepoint U+2285 (NOT A SUPERSET
3309-
OF).
3310-
3311-
Equivalent to C«!(>)».
3312-
33133323
=head2 Operators that return C<Set> or C<Bag>
33143324
33153325
=head2 term ∅

0 commit comments

Comments
 (0)