On 2017-07-21 5:07 AM, Timo Paulssen wrote:
You want (|) to get the union of two sets as a set.

https://docs.perl6.org/language/setbagmix#Set%2FBag_Operators

hth
  - Timo

Right. Every set operation except 1 (multiset sum) should result in a set, and is just a special case of the same behavior as the bag operation. Optionally the Set implementation of multiset sum could toss the duplicates and still result in a Set, thus being an alias for union with Sets, rather than resulting in a bag that it otherwise normally would. Depends on designer prefs I suppose.

Now, looking at that link, I can see at least 2 things that perhaps ought to be changed.

Firstly, I believe ∆ (U+2206) is the standard symbol for symmetric difference, and not circled minus as the above url currently gives.

Secondly, I see there's an operator for multiplying 2 bags (which I hadn't heard of before, but okay), but there should also be an operator for multiplying 1 bag by a natural number, that is a scalar multiply of a bag. Unless it is assumed the standard hyper-operator syntax is best for this.

-- Darren Duncan

Reply via email to