summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--2024/2.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/2024/2.hs b/2024/2.hs
index e29acec..26065ff 100644
--- a/2024/2.hs
+++ b/2024/2.hs
@@ -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]