Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Attempt to clarify the description of set/bag intersection.
I found the phrase "maximum weight all of the arguments share" a bit
confusing. Hopefully this new version is clearer. Your milage may
vary, I guess.
  • Loading branch information
edwinst committed Mar 24, 2015
1 parent 51cb139 commit bb4d9b3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/Language/setbagmix.pod
Expand Up @@ -257,15 +257,14 @@ Equivalent to L«(V<|>)».
only sub infix:<(&)>(**@p)
Returns the B<intersection> of all of its arguments. Generally, this creates
a new C<Set> that contains only the elements that all of its arguments
contain.
a new C<Set> that contains only the elements common to all of the arguments.
<a b c> (&) <b c d> === set <b c>
<a b c d> (&) <b c d e> (&) <c d e f> === set <c d>
If any of its arguments are C<Baggy>, this creates a new C<Bag> that
contains only the elements that all of the arguments contain, each weighted
by the maximum weight all of the arguments share for that element.
If any of the arguments are C<Baggy>, the result is a new C<Bag> containing
the common elements, each weighted by the largest I<common> weight (which
is the minimum of the weights of that element over all arguments).
bag(<a a b c a>) (&) bag(<a a b c c>) === bag(<a a b c>)
Expand Down

0 comments on commit bb4d9b3

Please sign in to comment.