http://www.perlmonks.org?node_id=427874


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.

Replies are listed 'Best First'.
Re^10: Better mousetrap (getting top N values from list X)
by BrowserUk (Patriarch) 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.