1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
open Core
module T = struct
type t =
{ row : int
; col : int
}
[@@deriving fields, sexp_of]
end
include T
module One_indexed_row = struct
include T
let to_zero t = { t with row = t.row - 1 }
let of_zero t = { t with row = t.row + 1 }
end