diff options
Diffstat (limited to 'ocaml/lib/year2025/day02/part01/id.mli')
| -rw-r--r-- | ocaml/lib/year2025/day02/part01/id.mli | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ocaml/lib/year2025/day02/part01/id.mli b/ocaml/lib/year2025/day02/part01/id.mli new file mode 100644 index 0000000..63d5942 --- /dev/null +++ b/ocaml/lib/year2025/day02/part01/id.mli @@ -0,0 +1,22 @@ +module ID : sig + (** [t] is a ID within a range *) + type t + + val create : int -> t + (** [create num] is an ID [t] *) + + val validate : (t -> bool) list -> t -> bool + (** [validate rules id] is [true] if the [id] passes all rule checks *) + + val incr : t -> t + (** [incr id] is the next [id] in the sequence *) + + val to_int : t -> int + (** [to_int id] is an integer representation of [id] *) + + val to_string : t -> string + (** [to_string id] is an string representation of [id] *) + + val pp : t -> string + (** [pp id] is a pretty string representing [id] *) +end |
