summaryrefslogtreecommitdiff
path: root/2025/ocaml/lib/application
diff options
context:
space:
mode:
authorDJ O'Leary <dijitol@proton.me>2025-12-11 03:54:45 +0100
committerDJ O'Leary <dijitol@proton.me>2025-12-11 03:54:45 +0100
commit02c55e2f55be5b012d311a3bfcf4a4515881819e (patch)
treedc003fd0eca3875ff3941a2ec3f456bd7a86631f /2025/ocaml/lib/application
parentf4930be59d15c42fdd9b25a354a123de1e8c7fe3 (diff)
feat(2025d5): add skeleton for problem
Diffstat (limited to '2025/ocaml/lib/application')
-rw-r--r--2025/ocaml/lib/application/d05p01.ml3
-rw-r--r--2025/ocaml/lib/application/d05p01.mli4
2 files changed, 7 insertions, 0 deletions
diff --git a/2025/ocaml/lib/application/d05p01.ml b/2025/ocaml/lib/application/d05p01.ml
new file mode 100644
index 0000000..4bf79ab
--- /dev/null
+++ b/2025/ocaml/lib/application/d05p01.ml
@@ -0,0 +1,3 @@
+let err_empty_input = "input is empty"
+
+let solve input () = if input = "" then Error err_empty_input else Ok 0
diff --git a/2025/ocaml/lib/application/d05p01.mli b/2025/ocaml/lib/application/d05p01.mli
new file mode 100644
index 0000000..85c3dd5
--- /dev/null
+++ b/2025/ocaml/lib/application/d05p01.mli
@@ -0,0 +1,4 @@
+val solve : string -> unit -> (int, string) result
+(** [solve input ()] is the solution for the first part of the five day of advent of code 2025 for [input].
+ The solution for an empty input is [Error msg].
+ Requires: [input] to be a string. *)