Untitled

mail@pastecode.io avatar
unknown
ocaml
2 years ago
228 B
0
Indexable
Never
let pairwise (p1 : string * int) p2 =
  match p1, p2 with
    (x1, y1), (x2, y2) -> x1 < x2 && y1 < y2;;

let lexicographic (p1 : string * int) p2 =
  match p1, p2 with
    (x1, y1), (x2, y2) -> x1 < x2 || (x1 = x2 && y1 < y2);;