Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by BrowserUk (Patriarch)
on Feb 03, 2005 at 23:34 UTC ( #427866=note: print w/replies, xml ) Need Help??


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

So,...you said:

...if you had lazy lists (coming in perl6)...

And I couldn't see how lazy lists would benefit this problem; hence my original question (way back up there^^^ somewhere).


Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.
  • Comment on Re^8: Better mousetrap (getting top N values from list X)

Replies are listed 'Best First'.
Re^9: Better mousetrap (getting top N values from list X)
by sleepingsquirrel (Hermit) on Feb 03, 2005 at 23:46 UTC
Re^9: Better mousetrap (getting top N values from list X)
by sleepingsquirrel (Hermit) on Feb 03, 2005 at 23:58 UTC
    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.

      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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://427866]
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 2022-09-30 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (125 votes). Check out past polls.

    Notices?