hello,
> ==> sort({ | map { +$_ // $_ }, .split: /\d+/, :v }) ==> say()
ok … so I'm lost but I'm not even curious to understand why (because of
my lack of interest for the ==> operator :))
regards
marc
--
Marc Chantreux
Pôle CESAR (Calcul et services avancés à la recherche)
Université de
Hi Marc,
This works:
==> sort({ | map { +$_ // $_ }, .split: /\d+/, :v }) ==>
say()
As the documentation says here https://docs.raku.org/routine/%3D%3D%26gt%3B
The precedence is very loose so you will need to use parentheses to assign
the result
On Thu, Mar 7, 2024 at 8:37 AM Marc
hello,
> How would you write that expression using the feed operator?
I tried
< afoo12 afoo2 >
==> {.sort: { | map { +$_ // $_ }, .split: /\d+/, :v }}
==> {map }
and the error message is really interesting
Only routine calls or variables that can '.append' may
Hi Elizabeth!
How would you write that expression using the feed operator?
Thanks,
Shimon
> On Mar 3, 2024, at 7:22 AM, Elizabeth Mattijsen wrote:
>
>> On 3 Mar 2024, at 03:32, ToddAndMargo via perl6-users
>> wrote:
>>
>>> On 3/2/24 05:13, Elizabeth Mattijsen wrote:
Hi rakoons,
On Sun, Mar 03, 2024 at 01:22:45PM +0100, Elizabeth Mattijsen wrote:
> Actually, the expression can be refined a bit:
>
> say .sort(*.split(/\d+/, :v).map({ (try .Int) // $_}).List)
Which is gorgeous! thanks for that. I read the documentation which is
clear about all the magic in
> On 3 Mar 2024, at 03:32, ToddAndMargo via perl6-users
> wrote:
>
>> On 3/2/24 05:13, Elizabeth Mattijsen wrote:
>>> .sort(*.split(/\d+/, :kv).map({ (try .Numeric) // $_}).List)
>
>> Hi Elizabeth,
>> It works perfectly. Thank you!
>> I have no idea why, I will ask you in another post
> Would
On 3/2/24 19:14, Clifton Wood wrote:
.sort(*.split(/\d+/, :kv).map({ (try .Numeric) // $_}).List)
Can you take apart the above for me?
https://gist.github.com/Xliff/286f1359e40d192d724ed9b900354015
On Sat, Mar 2, 2024 at 9:32 PM ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:
> > On 3/2/24 05:13, Elizabeth Mattijsen wrote:
> >> .sort(*.split(/\d+/, :kv).map({ (try .Numeric) //
> $_}).List)
>
> > Hi Elizabeth,
> >
>
On 3/2/24 05:13, Elizabeth Mattijsen wrote:
.sort(*.split(/\d+/, :kv).map({ (try .Numeric) // $_}).List)
Hi Elizabeth,
It works perfectly. Thank you!
I have no idea why, I will ask you in another post
Hi Elizabeth,
Would you take apart your sort piece by piece and explain
each part?