summaryrefslogtreecommitdiff
path: root/Main.lean
diff options
context:
space:
mode:
authorAndreas Grois <andi@grois.info>2024-09-24 20:04:26 +0200
committerAndreas Grois <andi@grois.info>2024-09-24 20:04:26 +0200
commitb1c7ab96169f80f62c8f5025cf2ebd74e9128f71 (patch)
tree1ea1882b66edf10cec6281b2d1c71759dba19b7c /Main.lean
parent5d08e39abca75b775bb7636973bb9c9a3bb908ac (diff)
Day 12 Part 1.
God, I fell into the premature optimization trap here... But I'm glad I did, that should make part 2 way easier.
Diffstat (limited to 'Main.lean')
-rw-r--r--Main.lean2
1 files changed, 2 insertions, 0 deletions
diff --git a/Main.lean b/Main.lean
index 0f87cc0..19fdb99 100644
--- a/Main.lean
+++ b/Main.lean
@@ -10,6 +10,7 @@ import «Day8»
import «Day9»
import «Day10»
import «Day11»
+import «Day12»
open DayPart
@@ -44,6 +45,7 @@ def try_run_day_part (day : Days) (part : Parts) (data : String) : IO String :=
| ⟨10,_⟩, Parts.Two => try_run_day_part_impl ⟨10,_⟩ Parts.Two data
| ⟨11,_⟩, Parts.One => try_run_day_part_impl ⟨11,_⟩ Parts.One data
| ⟨11,_⟩, Parts.Two => try_run_day_part_impl ⟨11,_⟩ Parts.Two data
+ | ⟨12,_⟩, Parts.One => try_run_day_part_impl ⟨12,_⟩ Parts.One data
| _, _ => throw $ IO.userError "The requested combination of day/part has not been implemented yet."
def main (parameters : List String): IO Unit := do