Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Sorting on identical values

by slugger415 (Monk)
on Aug 08, 2019 at 22:41 UTC ( #11104199=note: print w/replies, xml ) Need Help??


in reply to Sorting on identical values

Wonderful! thank you all for the useful replies. (I now have to learn more about Schwartzian sorting... great examples.)

Replies are listed 'Best First'.
Re^2: Sorting on identical values
by AnomalousMonk (Bishop) on Aug 09, 2019 at 00:12 UTC

    The Schwartzian transform is a general technique or pattern that is applicable to much more than sorting problems.


    Give a man a fish:  <%-{-{-{-<

        The Schwartzian transform is a general technique or pattern ...
        ... you might wanna check on that ...

        After looking at a bunch of Schwartzian Transforms, I must admit that they all seem to have sort stuck somewhere in the middle.

        I think what was bouncing around in the back of my mind when I wrote that were echoes of two important design patterns: a series of list-consuming/-producing functions (which may or may not include sort!) that feed each other seriatim to produce a final output; and the notion of memoization. I'd have to say now that while the ST (or decorate-sort-undecorate, or whatever) embodies those two patterns and is an important sorting design pattern, it's certainly not a general design pattern (or technique, or whatever).


        Give a man a fish:  <%-{-{-{-<

Re^2: Sorting on identical values
by BillKSmith (Prior) on Aug 09, 2019 at 15:52 UTC
    Refer to the FAQ.
    perldoc -q "How do I sort an array by (anything)?"
    Bill

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2019-10-23 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?