Skip to content

Commit c18ace4

Browse files
committed
1 parent ffe2a0e commit c18ace4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

09.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ parse :: String -> [[Int]]
77
parse = map (map read . words) . lines
88

99
p1 :: [[Int]] -> Int
10-
p1 = sum . map (foldr (\ds d -> last ds + d) 0 . dxs)
10+
p1 = sum . map (sum . map last . dxs)
1111

1212
p2 :: [[Int]] -> Int
1313
p2 = p1 . map reverse

0 commit comments

Comments
 (0)