Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #62 from edwinst/master
A couple of edits for "Sets, Bags, and Mixes"
  • Loading branch information
paultcochrane committed Mar 24, 2015
2 parents 103c676 + bb4d9b3 commit f64f3cf
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/Language/setbagmix.pod
Expand Up @@ -82,7 +82,7 @@ only C<Set> arguments.
multi sub infix:<(elem)>($a, Any $b --> Bool)
multi sub infix:<(elem)>($a, Set $b --> Bool)
Returns C<True> if C<$a> is an B<element> of C<$b> as an element.
Returns C<True> if C<$a> is an B<element> of C<$b>.
=head4 infix ∈
Expand Down 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 f64f3cf

Please sign in to comment.