open Printf open Goaljobs open Config (* From supermin *) let rec uniq ?(cmp = Pervasives.compare) = function | [] -> [] | [x] -> [x] | x :: y :: xs when cmp x y = 0 -> uniq ~cmp (x :: xs) | x :: y :: xs -> x :: uniq ~cmp (y :: xs) let sort_uniq ?(cmp = Pervasives.compare) xs = let xs = List.sort cmp xs in let xs = uniq ~cmp xs in xs