[GHC] #1218: Add sortNub and sortNubBy to Data.List
GHC
trac at galois.com
Mon Mar 12 23:08:33 EDT 2007
#1218: Add sortNub and sortNubBy to Data.List
-------------------------------+--------------------------------------------
Reporter: neil | Owner:
Type: proposal | Status: new
Priority: normal | Milestone: Not GHC
Component: libraries/base | Version:
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Architecture: Unknown | Os: Unknown
-------------------------------+--------------------------------------------
I propose the addition of sortNub and sortNubBy to Data.List
sortNub = sort . nub, but can run in O(n log n) instead of O(n^2) with the
implementation:
sortNub = map head . group . sort
I personally have defined this function over 25 times. Debate on the
libraries list.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1218>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list