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 932d992 commit bbd341d
Showing 1 changed file with 37 additions and 24 deletions.
61 changes: 37 additions & 24 deletions doc/Language/operators.pod6
Expand Up @@ -2318,7 +2318,7 @@ C«!(<=)».
C«» is codepoint U+2288 (NEITHER A SUBSET OF NOR EQUAL TO).
=head2 infix C«(>)», infix C«»
=head2 infix C«(>)», infix C«»
multi sub infix:<(>)>($a,$b --> Bool:D)
multi sub infix:<⊃>($a,$b --> Bool:D)
Expand Down Expand Up @@ -2353,6 +2353,42 @@ C«!(>)».
C«» is codepoint U+2285 (NOT A SUPERSET OF).
=head2 infix C«(>=)», infix C«»
multi sub infix:<(>=)>($a,$b --> Bool:D)
multi sub infix:<⊇>($a,$b --> Bool:D)
X<Superset of or equal to operator>.
Returns C<True> if C<$a> is a B<superset> of C<$b>, i.e., that all the
elements of C<$b> are elements of C<$a> but C<$a> is a larger or equal sized
set than C<$b>.
=begin code
say (1,2,3) (>=) (2,3,1); # OUTPUT: «True␤»
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+2287 (SUPERSET OF OR EQUAL TO).
=head2 infix C«»
multi sub infix:<⊉>($a,$b --> Bool:D)
X<Not a superset of nor equal to operator>.
Returns C<True> if C<$a> is B<not> a C<superset> of C<$b>. Equivalent to
C«!(>=)».
=begin code
say (1,2,3) ⊉ (2,3,1); # OUTPUT: «False␤»
say (1,2,3) ⊉ (2,3); # OUTPUT: «False␤»
say 4 !(>=) (1,2,3); # OUTPUT: «True␤»
=end code
C«» is codepoint U+2289 (NEITHER A SUPERSET OF OR EQUAL TO).
=head1 Tight AND precedence
=head2 infix C«&&»
Expand Down Expand Up @@ -3297,29 +3333,6 @@ This summary those operators are included for completeness.
=head2 Operators that return C<Bool>
=head3 infix (>=)
X<Superset of or equal to operator>.
Like L«(<=)» with reversed arguments. Returns C<True> if C<$a> is a
B<superset> of or equal to C<$b>.
=head3 infix ⊇
Alternate X<superset of or equal to operator>, at codepoint U+2287 (SUPERSET
OF OR EQUAL TO).
=head3 infix !(>=)
X<Neither a superset of nor equal to operator>.
=head3 infix ⊉
Alternate X<neither a superset of nor equal to operator>, at codepoint U+2289
(NEITHER A SUPERSET OF NOR EQUAL TO).
Equivalent to C«!(>=)»,
=head2 Operators that return C<Set> or C<Bag>
=head2 term ∅
Expand Down

0 comments on commit bbd341d

Please sign in to comment.