From 32b6bf7bbe6124a0a1c69f46dac996806a1409c9 Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Sat, 9 Dec 2023 16:35:55 +0100 Subject: Fix Day 8 Part 2: Forgot to un-comment something. While it doesn't change the result, it was technically wrong. --- Day8.lean | 4 ++-- 1 file 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 -------------------------------------------------------------------------------------------------------- -- cgit v1.2.3