From 571f8cb385a0888d6a3c195040d33bb4be891c02 Mon Sep 17 00:00:00 2001 From: DJ O'Leary Date: Thu, 4 Dec 2025 01:48:06 +0100 Subject: feat(2025d2p2): solve 2025 day 2 part 2 --- 2025/ocaml/lib/domain/d02p02.ml | 4 ---- 2025/ocaml/lib/domain/d02p02.mli | 6 ------ 2 files changed, 10 deletions(-) (limited to '2025/ocaml/lib/domain') diff --git a/2025/ocaml/lib/domain/d02p02.ml b/2025/ocaml/lib/domain/d02p02.ml index d1624b6..b2b55f1 100644 --- a/2025/ocaml/lib/domain/d02p02.ml +++ b/2025/ocaml/lib/domain/d02p02.ml @@ -4,12 +4,8 @@ module ID = struct let create num = num - let validate rules id = List.fold_left (fun acc r -> acc || r id) false rules - let incr = ( + ) 1 - let to_int id = id - let to_string = string_of_int let pp id = "ID=" ^ string_of_int id diff --git a/2025/ocaml/lib/domain/d02p02.mli b/2025/ocaml/lib/domain/d02p02.mli index 55665fe..f918ae1 100644 --- a/2025/ocaml/lib/domain/d02p02.mli +++ b/2025/ocaml/lib/domain/d02p02.mli @@ -5,15 +5,9 @@ module ID : sig 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] *) -- cgit v1.2.3