Skip to content

Instantly share code, notes, and snippets.

@jdan
Last active December 3, 2019 18:12
Show Gist options
  • Save jdan/11b3df7708dac50834f96f89d16eafe6 to your computer and use it in GitHub Desktop.
Save jdan/11b3df7708dac50834f96f89d16eafe6 to your computer and use it in GitHub Desktop.
module IntPairs = Set.Make (
struct
type t = int * int
let compare = compare
end
)
let () =
let ips = IntPairs.of_list [(1, 1); (1, 2); (2, 1); (1, 2)]
in
IntPairs.iter
(fun (x, y) ->
(string_of_int x) ^ ", " ^ (string_of_int y) |> print_endline)
ips
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment