On Sun, Aug 22, 2021 at 2:58 PM Marc Chantreux <e...@phear.org> wrote:
> so of course i tried > > my (@a, @b) = { .[0,2…∞], .[1,3…∞] }.(q<AABBCCDD>.comb); > > because i have two lists and two containers. this doesn't work. > which means @ and $ combines with = to define how things are stored > but i don't understand how for the moment. > Try: > my (@a, @b) := { .[0,2…∞], .[1,3…∞] }.(q<AABBCCDD>.comb);say @a;say @b (A B C D) (A B C D) In this case the binding operator ':=' makes the difference. When one uses the assignment operator '=', the right side value is interpreted as an array of two elements, each one is a list of four elements: [(A B C D) (A B C D)]. When one binds, each array is bound to one list. -- Fernando Santagata