summaryrefslogtreecommitdiff
path: root/Day8.lean
diff options
context:
space:
mode:
authorAndreas Grois <andi@grois.info>2024-12-17 19:47:14 +0100
committerAndreas Grois <andi@grois.info>2024-12-17 19:47:14 +0100
commit19d4b4e41a967c0c8b3329cd1c4a0617178c5a94 (patch)
treee5aff19158c526ebf5fbec2b51c8cde9da8e129f /Day8.lean
parent8f1a6c619a238531aed9dd3f4479d658fcf1d101 (diff)
Lean 4.14
Diffstat (limited to 'Day8.lean')
-rw-r--r--Day8.lean2
1 files changed, 1 insertions, 1 deletions
diff --git a/Day8.lean b/Day8.lean
index 62dc1fa..079e485 100644
--- a/Day8.lean
+++ b/Day8.lean
@@ -290,7 +290,7 @@ private def findFirstCommonCyclingGoal (waypoints : Std.HashMap WaypointId Conne
let cyclingGoals := startPositions.map $ findCyclingGoalsInPath waypoints instructions possibleStarts
let combinedGoals : List CyclingGoal := match cyclingGoals with
| [] => []
- | g :: gs => flip gs.foldl g λc n ↦ c.bind λ cc ↦ n.filterMap λ nn ↦ nn.combine cc
+ | g :: gs => flip gs.foldl g λc n ↦ c.flatMap λ cc ↦ n.filterMap λ nn ↦ nn.combine cc
let cyclingGoalStarts := combinedGoals.map CyclingGoal.start
cyclingGoalStarts.min?