Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^9: Better mousetrap (getting top N values from list X)

by sleepingsquirrel (Hermit)
on Feb 03, 2005 at 23:58 UTC ( #427874=note: print w/ replies, xml ) Need Help??


in reply to Re^8: Better mousetrap (getting top N values from list X)
in thread Better mousetrap (getting top N values from list X)

You're correct, sort is strict on its input arguments (i.e. it has to evaluate each one), but the importance of laziness comes about because the output is a lazy list.


-- All code is 100% tested and functional unless otherwise noted.


Comment on Re^9: Better mousetrap (getting top N values from list X)
Download Code
Replies are listed 'Best First'.
Re^10: Better mousetrap (getting top N values from list X)
by BrowserUk (Pope) on Feb 04, 2005 at 00:05 UTC

    See 427875


    Examine what is said, not who speaks.
    Silence betokens consent.
    Love the truth but pardon error.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2016-02-08 23:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (291 votes), past polls