From 67d0b0c8fa307308e8a96ce4566821aa8260ef73 Mon Sep 17 00:00:00 2001
From: Andreas Grois <andi@grois.info>
Date: Sun, 8 Sep 2024 19:32:49 +0200
Subject: Fix issue in Day10 Part1 end condition.

---
 Day10.lean | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'Day10.lean')

diff --git a/Day10.lean b/Day10.lean
index 17b864f..5bc283e 100644
--- a/Day10.lean
+++ b/Day10.lean
@@ -979,7 +979,7 @@ def part1 (area : Area) : Option Nat := do
 where
   pathsMet := λ (ps : List $ Area.PathHead area) ↦ match ps with
   | [] => false
-  | p :: ps => ps.any λh ↦ h.current = p.current
+  | p :: ps => ps.any λh ↦ h.current = p.current || pathsMet ps
   noSolution := λ (ps : List $ Area.PathHead area) ↦ match ps with
   | [] => true
   | _ :: [] => true
-- 
cgit v1.2.3

