You can either write a comparison function that returns an Order, or a function that converts your type to a comparable. Then you use List.sortBy or List.sortWith. I don't really know how a generic sort function would…
You can either write a comparison function that returns an Order, or a function that converts your type to a comparable. Then you use List.sortBy or List.sortWith. I don't really know how a generic sort function would…