module ComparableIntPair = struct type t = int * int (* analogue du compareTo de java *) let compare (x1,y1) (x2,y2) = if x1 < x2 then -1 else if x1 > x2 then 1 else if y1 < y2 then -1 else if y1 > y2 then 1 else 0 end ;;