Is there a sort function in the libraries that come with GHC (6.4)? My search at http://www.haskell.org/ghc/docs/latest/html/libraries/index.html has failed, but I can't believe there is none. -- regards, radu http://rgrig.blogspot.com/
Data.List contains sort :: Ord a => [a] -> [a] and sortBy :: (a -> a -> Ordering) -> [a] -> [a] I believe they're currently implemented using merge sort, at least in GHC. /g On 2/16/06, Radu Grigore <radugrigore@gmail.com> wrote:
Is there a sort function in the libraries that come with GHC (6.4)? My search at http://www.haskell.org/ghc/docs/latest/html/libraries/index.html has failed, but I can't believe there is none.
-- regards, radu http://rgrig.blogspot.com/
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- We have lingered in the chambers of the sea By sea-girls wreathed with seaweed red and brown Till human voices wake us, and we drown.
Hi Radu,
Is there a sort function in the libraries that come with GHC (6.4)?
import Data.List Or just hit Hoogle with "sort" http://haskell.org/hoogle/?q=sort Thanks Neil On 16/02/06, Radu Grigore <radugrigore@gmail.com> wrote: My search at
http://www.haskell.org/ghc/docs/latest/html/libraries/index.html has failed, but I can't believe there is none.
-- regards, radu http://rgrig.blogspot.com/
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Yes, it's in Data.List, and called 'sort'. You can use the index (see top right) to look for it under 'S'. - Cale On 16/02/06, Radu Grigore <radugrigore@gmail.com> wrote:
Is there a sort function in the libraries that come with GHC (6.4)? My search at http://www.haskell.org/ghc/docs/latest/html/libraries/index.html has failed, but I can't believe there is none.
-- regards, radu http://rgrig.blogspot.com/
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (4)
-
Cale Gibbard -
J. Garrett Morris -
Neil Mitchell -
Radu Grigore