Move IntPair and PosSet into Aoc library.
These are obviously generic enough and useful for the future that they can be moved to a shared library.
This commit is contained in:
@@ -23,3 +23,12 @@ let main prep parts =
|
||||
with e ->
|
||||
Printf.printf "An error occured: %s\n" (Printexc.to_string e);
|
||||
exit 1
|
||||
|
||||
module IntPair = struct
|
||||
type t = int * int
|
||||
|
||||
let compare (x, y) (x', y') =
|
||||
match compare y y' with 0 -> compare x x' | c -> c
|
||||
end
|
||||
|
||||
module IntPairSet = Set.Make (IntPair)
|
||||
|
Reference in New Issue
Block a user