I have a list of tuples representing the coordinates of points. How can I sort them by the first or second value so that I can order my glasses first from left to right and from top to bottom?
It looks like you want, for example,
myList |> List.sortBy fst
http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/FSharp.Core/Microsoft.FSharp.Collections.List.html
But tuples support structural equality and comparison, so default sorting (lexicography) can do what you want.
Side note:
, , Set . Tetris.
let sorted = List.sort_by (fun (a,b) -> a,b) myList
Change a, b if you need another way