summaryrefslogtreecommitdiff
path: root/Day8.lean
diff options
context:
space:
mode:
authorAndreas Grois <andi@grois.info>2023-12-09 16:35:55 +0100
committerAndreas Grois <andi@grois.info>2023-12-09 16:35:55 +0100
commit32b6bf7bbe6124a0a1c69f46dac996806a1409c9 (patch)
tree0452a1d228b3d7967faff268ef5baf02b5719ece /Day8.lean
parentecbf7b27be05dc242f066e681dbe22c4274834f5 (diff)
Fix Day 8 Part 2: Forgot to un-comment something.
While it doesn't change the result, it was technically wrong.
Diffstat (limited to 'Day8.lean')
-rw-r--r--Day8.lean4
1 files changed, 2 insertions, 2 deletions
diff --git a/Day8.lean b/Day8.lean
index e6de124..229ca85 100644
--- a/Day8.lean
+++ b/Day8.lean
@@ -300,8 +300,8 @@ def part2 (input : List Instruction × List Waypoint) : Option Nat :=
let waypoints : HashMap WaypointId ConnectedWaypoints := HashMap.ofList $ input.snd.map λw ↦ (w.id, {left := w.left, right := w.right : ConnectedWaypoints})
let instructions := input.fst
let positions : List WaypointId := (input.snd.filter λ(w : Waypoint) ↦ w.id.endsWith "A").map Waypoint.id
- -- part2_impl waypoints instructions 0 (positions.map λ_ ↦ possibleStarts) positions
- -- <|> -- if part2_impl fails (it does), we need to dig deeper.
+ part2_impl waypoints instructions 0 (positions.map λ_ ↦ possibleStarts) positions
+ <|> -- if part2_impl fails (it does), we need to dig deeper.
findFirstCommonCyclingGoal waypoints instructions possibleStarts positions
--------------------------------------------------------------------------------------------------------