Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: sort +*, @array (misinformation)

by raiph (Hermit)
on Dec 10, 2013 at 07:10 UTC ( #1066389=note: print w/ replies, xml ) Need Help??


in reply to Re^3: sort +*, @array (misinformation)
in thread sort +*, @array

It's not an Orcish Maneuver.

The original example +* (reads "numeric context Whatever") is syntactic sugar for the one arg closure {+*} which is in turn treated by the P6 sort builtin as a key extractor and results in use of the comparator closure {$a<=>$b}.

I've realized I didn't make it clear that my response to your challenge contained two parts and you needed to read both to see the ST equivalence. I suspect you didn't read both. I've updated it to try make things clearer.


Comment on Re^4: sort +*, @array (misinformation)
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1066389]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2015-07-05 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls