Question
I have a list of tuples representing coordinates of points. How can I sort them by the first or second value, so that I could order my points from left to right first and from top to bottom next?
Solution
Sounds like you want e.g.
myList |> List.sortBy fst
But tuples support structural equality and comparison, so the default sort (lexicographical) may do what you want.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow