News for hackers. Stuff that matters.
Re:What it's like to use Haskell by cscheid on Wednesday March 26, 2014 @09:50PM (#7478059)
A fast sorting algorithm in Haskell degrades gracefully to a (faster) selection algorithm when you don't ask for the whole thing.

In other words, "sort lst" gives you a sorted list, but "take 5 (sort lst)" gives you the first five elements, without sorting the rest of the list.

There are no comments on this comment yet.