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