@@ -22,7 +22,7 @@ list must have the same type.
2222@docs sum, product, maximum, minimum, all, any, and, or
2323
2424# Sorting
25−@docs sort, sortBy
25+@docs sort, sortBy, sortWith
2626-}
2727
2828import open Basics
@@ -232,6 +232,11 @@ repeat = Native.List.repeat
232232sort : [comparable] -> [comparable]
233233sort = Native.List.sort
234234
235−{-| Sort a list by a given comparison function. -}
235+{-| Sort a list by a given comparison transformation, such a [record field
236+accessors](http://elm-lang.org/learn/Syntax.elm#records). -}
236237sortBy : (a -> comparable) -> [a] -> [a]
237238sortBy = Native.List.sortBy
239+
240+{-| Sort a list by a given comparison function. -}
241+sortWith : (a -> a -> Order) -> [a] -> [a]
242+sortWith = Native.List.sortWith