summary refs log tree commit diff stats
path: root/Program.fs
diff options
context:
space:
mode:
authorBrian Chu <brianmchu42@gmail.com>2022-12-01 21:54:55 -0800
committerBrian Chu <brianmchu42@gmail.com>2022-12-01 21:54:55 -0800
commit3266661d4c6ed2e255f8e4d63ec7e5f58d4ddfe8 (patch)
tree7c443ac3aaced287cd495c4dcdf69bc0638be805 /Program.fs
parent1fc9d5b88b352ffab0f2a6aa0bcbd57fc3a5da25 (diff)
downloadAdventOfCode2022-3266661d4c6ed2e255f8e4d63ec7e5f58d4ddfe8.tar.gz
handle values in command line parsing
Diffstat (limited to 'Program.fs')
-rw-r--r--Program.fs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Program.fs b/Program.fs
index f720b0c..e85d15f 100644
--- a/Program.fs
+++ b/Program.fs
@@ -1,5 +1,5 @@
 open Solutions
-exception NotImplementedYet of string
+exception NotImplemented of string
 
 let args = System.Environment.GetCommandLineArgs()
 
@@ -11,5 +11,6 @@ match (day, part) with
 | (1, 1) -> Day1.part1 () |> printf "%A\n"
 | (1, 2) -> Day1.part2 () |> printf "%A\n"
 | (2, 1) -> Day2.part1 () |> printf "%A\n"
-| (2, 2) -> Day2.part2 () |> printfn "%A\n"
-| _ -> raise (NotImplementedYet("not implemented yet"))
\ No newline at end of file
+| (2, 2) -> Day2.part2 () |> printf "%A\n"
+| (x, y) when (1 <= x && x <= 25) && (y = 1 || y = 2)  -> raise (NotImplemented("not implemented yet"))
+| _ -> raise (NotImplemented("invalid values"))
\ No newline at end of file