diff options
Diffstat (limited to '2025/ocaml/lib/application')
| -rw-r--r-- | 2025/ocaml/lib/application/d05p01.ml | 3 | ||||
| -rw-r--r-- | 2025/ocaml/lib/application/d05p01.mli | 4 |
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. *) |
