Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
herteby
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
herteby
7y ago
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 work without type