Better HN
topnewbestaskshowjobs
Log inSign up

herteby

3 karma · joined Feb 5, 2020 (6y ago) · 1 submissions

Submissions

comment 6y ago · link · parent

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 typeclasses/interfaces.