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 8b23372 commit c4712fd
Showing 1 changed file with 35 additions and 24 deletions.
59 changes: 35 additions & 24 deletions doc/Language/operators.pod6
Expand Up @@ -2247,6 +2247,41 @@ C<!(cont)>.
C«» is codepoint U+220C (DOES NOT CONTAIN AS MEMBER).
=head2 infix C«(<)», infix C«»
multi sub infix:<(<)>($a,$b --> Bool:D)
multi sub infix:<⊂>($a,$b --> Bool:D)
X<Subset of operator>.
Returns C<True> if C<$a> is a B<strict subset> of C<$b>, i.e., that all the
elements of C<$a> are elements of C<$b> but C<$a> is a smaller set than C<$b>.
=begin code
say (1,2,3) (<) (2,3,1); # OUTPUT: «False␤»
say (2,3) (<) (2,3,1); # OUTPUT: «True␤»
say 4 ⊂ (1,2,3); # OUTPUT: «False␤»
=end code
C«» is equivalent to C«(<)», at codepoint U+2282 (SUBSET OF).
=head2 infix C«»
multi sub infix:<⊄>($a,$b --> Bool:D)
X<Not a subset of operator>.
Returns C<True> if C<$a> is B<not> a C<strict subset> of C<$b>. Equivalent to
C«!(<)».
=begin code
say (1,2,3) ⊄ (2,3,1); # OUTPUT: «True␤»
say (2,3) ⊄ (2,3,1); # OUTPUT: «False␤»
say 4 !(<) (1,2,3); # OUTPUT: «True␤»
=end code
C«» is codepoint U+2284 (NOT A SUBSET OF).
=head1 Tight AND precedence
=head2 infix C«&&»
Expand Down Expand Up @@ -3216,30 +3251,6 @@ Alternate X<neither subset of nor equal to operator>, at codepoint U+2288
Equivalent to C«!(<=)».
=head3 infix (<)
X<Subset of operator>.
Returns C<True> if C<$a> is a B<strict subset> of C<$b>.
=head3 infix ⊂
Alternate X<subset of operator>, at codepoint U+2282 (SUBSET OF).
Equivalent to L«(<)».
=head3 infix !(<)
X<Not a subset of operator>.
Returns C<True> if C<$a> is a B<not a strict subset> of C<$b>.
=head3 infix ⊄
Alternate X<not a subset of operator>, at codepoint U+2284 (NOT A SUBSET OF).
Equivalent to C«!(<)».
=head3 infix (>=)
X<Superset of or equal to operator>.
Expand Down

0 comments on commit c4712fd

Please sign in to comment.