summaryrefslogtreecommitdiff
path: root/2025/ocaml/lib/domain
diff options
context:
space:
mode:
authorDJ O'Leary <dijitol@proton.me>2025-12-04 01:48:06 +0100
committerDJ O'Leary <dijitol@proton.me>2025-12-04 01:48:06 +0100
commit571f8cb385a0888d6a3c195040d33bb4be891c02 (patch)
tree7bbee4c16b0d665e5b9a29d816eea02b86e717ca /2025/ocaml/lib/domain
parentde813901748af4ba4d52aa193f0e6bcff9e27c8b (diff)
feat(2025d2p2): solve 2025 day 2 part 2
Diffstat (limited to '2025/ocaml/lib/domain')
-rw-r--r--2025/ocaml/lib/domain/d02p02.ml4
-rw-r--r--2025/ocaml/lib/domain/d02p02.mli6
2 files changed, 0 insertions, 10 deletions
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] *)