develooper Front page | perl.perl6.users | Postings from August 2021

pairs of separators from a string

Thread Next
From:
Marc Chantreux
Date:
August 21, 2021 07:05
Subject:
pairs of separators from a string
Message ID:
YSCljGwbfLxojLvl@prometheus.u-strasbg.fr
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



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About