thanks everyone for sharing,

Vadim,

my ($a, $b) = { @^a[0,2...Inf], @a[1,3...Inf] }.(q<(){}[]>.comb); say $a[0]; 
say $b[0]

oh. i never see this direct call of a lambda before but it really makes
sense! this is the answer i like the most.

i rewrote it my way and this works

my ($a, $b) = { .[0,2…∞], .[1,3…∞] }.(q<AABBCCDD>.comb);

it would be nice if this one will:

my ($a, $b) = { .[0,2…∞], .[1,3…∞] }.: q<AABBCCDD>.comb;

But here is one of the reasons i'm still unconfortable with raku is the
fact that sigils don't make sense anymore to me (in the contrary of perl
were sigils means "i want a [$%@] from this").

so as i can't get grid of sigils in this case

    my (\a, \b) = { .[0,2…∞], .[1,3…∞] }.(q<AABBCCDD>.comb);

i need to choose a sigil. The way i understand sigils is
"an optional type specifier". to me

    my $truc  => my container 'truc' for anything you want
    my @truc  => my container 'truc' for something that should mostly
                 be understood as indexed
    my %truc  => my container 'truc' for something that should mostly
                 be understood as associative

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.

regards,
marc

Reply via email to