diff options
| author | Andreas Grois <andi@grois.info> | 2023-12-09 16:35:55 +0100 |
|---|---|---|
| committer | Andreas Grois <andi@grois.info> | 2023-12-09 16:35:55 +0100 |
| commit | 32b6bf7bbe6124a0a1c69f46dac996806a1409c9 (patch) | |
| tree | 0452a1d228b3d7967faff268ef5baf02b5719ece /Day8.lean | |
| parent | ecbf7b27be05dc242f066e681dbe22c4274834f5 (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.lean | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 -------------------------------------------------------------------------------------------------------- |
