@@ -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
25+@docs sort, sortBy
28import open Basics
28import open Basics
@@ -231,3 +231,7 @@ repeat = Native.List.repeat
231{-| Sort a list in ascending order. -}
231{-| Sort a list in ascending order. -}
232sort : [comparable] -> [comparable]
232sort : [comparable] -> [comparable]
233sort = Native.List.sort
233sort = Native.List.sort
235+{-| Sort a list by a given comparison function. -}
236+sortBy : (a -> comparable) -> [a] -> [a]
237+sortBy = Native.List.sortBy