infix (+), infix ⊎

Documentation for infix (+), infix ⊎ assembled from the following types:

language documentation Operators

From Operators

(Operators) infix (+), infix ⊎

multi sub infix:<(+)>(**@p)
multi sub infix:<>(**@p)

Baggy addition operator.

Returns the Baggy addition of its arguments. This creates a new Bag from each element of the arguments with the weights of the element added together to get the new weight, if none of the arguments are a Mix or MixHash.

say <a a b c a d> (+) <a a b c c># OUTPUT: «Bag(a(5), b(2), c(3), d)␤» 

If any of the arguments is a Mixy, the result is a new Mix.

say <a b c> (+) (=> 2.5=> 3.14).Mix# OUTPUT: «Mix(a(3.5), b(4.14), c)␤» 

is equivalent to (+), at codepoint U+228E (MULTISET UNION).

language documentation Sets, bags, and mixes

From Sets, bags, and mixes

(Sets, bags, and mixes) infix (+), infix ⊎

Returns the Baggy addition of its arguments. More information.