sortWith package:base-prelude

The sortWith function sorts a list of elements using the user supplied function to project something out of each element