Skip to content

Commit 4c9c466

Browse files
committed
get a few lines of text started for the set/bag operators
1 parent 7316137 commit 4c9c466

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

S03-operators.pod

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3288,6 +3288,43 @@ The various operators for sets and bags (intersection, union,
32883288
etc.) also have junctive precedence (except for those that return Bool,
32893289
which are instead classified as chaining operators).
32903290

3291+
=head1 Set and Bag operators
3292+
3293+
These operators work on Sets, Bags or Positionals that will be coerced to sets.
3294+
3295+
=head2 with "junctive and" precedence
3296+
3297+
Unicode Texas Explanation
3298+
======= ===== ===========
3299+
(&) Set or Bag with all elements that are in both the lhs and rhs
3300+
(.) Bag with the elements of lhs and rhs multiplied.
3301+
3302+
=head2 with "junctive or" precedence
3303+
3304+
Unicode Texas Explanation
3305+
======= ===== ===========
3306+
(-) Set or Bag with all elements of the rhs removed
3307+
(+) Set or Bag with all elements of the lhs and rhs summed
3308+
(^) Set with elements that are in lhs, or rhs, but not in both
3309+
(|) Set with elements that are in the lhs or rhs or both
3310+
3311+
=head2 with "chaining infix" precedence
3312+
3313+
This section contains all the set comparison operators:
3314+
3315+
Unicode Texas Explanation
3316+
======= ===== ===========
3317+
(elem) lhs is an element of the set on the rhs
3318+
!(elem) lhs is not an element of the set on the rhs
3319+
(cont) lhs completely contains the set on the rhs
3320+
!(cont) lhs doesn't completely contain the set on the rhs
3321+
(<) all elements in the lhs and more are also in the rhs
3322+
(<=) all elements in the lhs are also in the rhs
3323+
(>) all elements in the rhs and more are also in the lhs
3324+
(>=) all elements in the rhs are also in the lhs
3325+
(<+) all elements in the lhs bag are contained more often in the rhs bag
3326+
(>+) all elements in the lhs bag are contained less often in the rhs bag
3327+
32913328
=head1 Comparison semantics
32923329

32933330
=over

0 commit comments

Comments
 (0)