I supposed, the result should be
1, 2, 3.
> my ($a, $b, $c) > (($a, $b), $c) = ((1, 2), 3) (((1 2) 3) (Any)) > $a, $b, $c ((1 2) 3 (Any))
What's wrong here?
There's nothing wrong (that is, ordinary assignment in P6 is designed to do as it has done) but at a guess you were hoping that making the structure on the two sides the same would result in
For that, you want "binding assignment" (aka just "binding"), not ordinary assignment:
my ($a, $b, $c); :(($a, $b), $c) := ((1, 2), 3);
Note the colon before the list on the left, making it a signature literal, and the colon before the
=, making it a binding operation.