diff options
-rw-r--r-- | 2024/2.hs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -7,6 +7,6 @@ main = do let safeRep l = all (uncurry safePair) (zip l (tail l)) || all (uncurry (flip safePair)) (zip l (tail l)) print $ sum [fromEnum (safeRep l) | l <- input] - let dampened l = zipWith (++) (inits l) (tail (tails l)) + let dampened l = l : zipWith (++) (inits l) (tail (tails l)) let safeRep' l = any safeRep (dampened l) print $ sum [fromEnum (safeRep' l) | l <- input] |