Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add infix C«(>)», infix C«⊂», infix C«⊅» to operators
  • Loading branch information
lizmat committed May 6, 2019
1 parent 863ebf0 commit 932d992
Showing 1 changed file with 35 additions and 25 deletions.
60 changes: 35 additions & 25 deletions doc/Language/operators.pod6
Expand Up @@ -2318,6 +2318,41 @@ C«!(<=)».
C«» is codepoint U+2288 (NEITHER A SUBSET OF NOR EQUAL TO).
=head2 infix C«(>)», infix C«»
multi sub infix:<(>)>($a,$b --> Bool:D)
multi sub infix:<⊃>($a,$b --> Bool:D)
X<Superset of operator>.
Returns C<True> if C<$a> is a B<strict superset> of C<$b>, i.e., that all the
elements of C<$b> are elements of C<$a> but C<$a> is a larger set than C<$b>.
=begin code
say (1,2,3) (>) (2,3,1); # OUTPUT: «False␤»
say (1,2,3) (>) (2,3); # OUTPUT: «True␤»
say 4 ⊃ (1,2,3); # OUTPUT: «False␤»
=end code
C«» is equivalent to C«(>)», at codepoint U+2283 (SUPERSET OF).
=head2 infix C«»
multi sub infix:<⊅>($a,$b --> Bool:D)
X<Not a superset of operator>.
Returns C<True> if C<$a> is B<not> a C<strict superset> of C<$b>. Equivalent to
C«!(>)».
=begin code
say (1,2,3) ⊅ (2,3,1); # OUTPUT: «True␤»
say (1,2,3) ⊅ (2,3); # OUTPUT: «False␤»
say 4 !(>) (1,2,3); # OUTPUT: «True␤»
=end code
C«» is codepoint U+2285 (NOT A SUPERSET OF).
=head1 Tight AND precedence
=head2 infix C«&&»
Expand Down Expand Up @@ -3285,31 +3320,6 @@ Alternate X<neither a superset of nor equal to operator>, at codepoint U+2289
Equivalent to C«!(>=)»,
=head3 infix (>)
X<Superset of operator>.
Like L«(<)» with reversed arguments. Returns C<True> if C<$a> is a
B<strict superset> of C<$b>.
=head3 infix ⊃
Alternate superset of operator, at codepoint U+2283 (SUPERSET OF).
=head3 infix !(>)
X<Not a superset of operator>.
Like L«(<)» with reversed logic. Returns C<True> if C<$a> is B<not a strict
superset> of C<$b>
=head3 infix ⊅
Alternate X<not a superset of operator>, at codepoint U+2285 (NOT A SUPERSET
OF).
Equivalent to C«!(>)».
=head2 Operators that return C<Set> or C<Bag>
=head2 term ∅
Expand Down

0 comments on commit 932d992

Please sign in to comment.