I guess you need something like this:

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



Best regards,
Vadim Belman

> On Aug 21, 2021, at 3:04 AM, Marc Chantreux <e...@phear.org> wrote:
> 
> hello,
> 
> i would like to get the list of opening (α) and closing
> (ω) separators from this string:
> 
>    &""''(){}[]
> 
> too many years of perl made me think about this solution
> or something alike but it didn't work.
> 
> my (\α,\ω) =| map
>    { .[0,2…∞], .[1,3…∞] },
>    q&""''(){}[]&.comb;
> 
> fixing this is important to me because it illustrate how bad i am to
> comprehend how raku flatten things.
> 
> regards,
> marc
> 
> 

Reply via email to