@@ -22,7 +22,7 @@ list must have the same type.
22@docs sum, product, maximum, minimum, all, any, and, or
22@docs sum, product, maximum, minimum, all, any, and, or
25−@docs sort, sortBy
25+@docs sort, sortBy, sortWith
28import open Basics
28import open Basics
@@ -232,6 +232,11 @@ repeat = Native.List.repeat
232sort : [comparable] -> [comparable]
232sort : [comparable] -> [comparable]
233sort = Native.List.sort
233sort = Native.List.sort
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). -}
236sortBy : (a -> comparable) -> [a] -> [a]
237sortBy : (a -> comparable) -> [a] -> [a]
237sortBy = Native.List.sortBy
238sortBy = Native.List.sortBy
240+{-| Sort a list by a given comparison function. -}
241+sortWith : (a -> a -> Order) -> [a] -> [a]
242+sortWith = Native.List.sortWith