Should &set, Set, and Set.new have different semantics? If so, why?
Consider the following code:
my @array = 1, 2;
my @other-array = ([3, 4],);
dd set(@array, @other-array); #OUTPUT: Set.new(1,2,[3, 4])
dd Set(@array, @other-array); #OUTPUT: Set.new(1,2,[3, 4])
dd Set.new: @array, @other-array; #OUTPUT: Set.new([1, 2],[[3, 4],])
Is the different output of Set.new intentional or the result of a bug in &set/Set? (I expected all three to have the output produced by Set.new – am I missing something about the intended semantics?)
the difference between
setandSet.new:is only (Un)flattened slurpy paramters*@avs.**@a.Set()is coercion.