infix (^), infix ⊖

Documentation for infix (^), infix ⊖ assembled from the following types:

language documentation Sets, bags, and mixes

From Sets, bags, and mixes

(Sets, bags, and mixes) infix (^), infix ⊖

Returns the symmetric set difference of all its arguments. More information, Wikipedia definition.

language documentation Operators

From Operators

(Operators) infix (^), infix ⊖

multi sub infix:<(^)>($a$b)
multi sub infix:<>($a,$b)
 
multi sub infix:<(^)>(**@p)
multi sub infix:<>(**@p)

Symmetric set difference operator.

Returns the symmetric set difference of all its arguments. This creates a new Set made up of all the elements that $a has but $b doesn't and all the elements $b has but $a doesn't if none of the arguments are a Bag, BagHash, Mix or MixHash. Equivalent to ($a ∖ $b) ∪ ($b ∖ $a).

say <a b> (^) <b c># OUTPUT: «set(a c)␤» 

If any of the arguments are Baggy or Mixy>, the result is a new Bag (or Mix).

say <a b>  bag(<b c>); # OUTPUT: «Bag(a, c)␤» 

is equivalent to (^), at codepoint U+2296 (CIRCLED MINUS).