Skip to content

Commit

Permalink
Day_07(2023): some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheinxy committed Dec 7, 2023
1 parent a83de7d commit c5df9a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 2023/Day_07/Day_07.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ parseInput :: String -> Input
parseInput = map ((\[c, b] -> Hand c (read b) (getType c) "23456789TJQKA") . words) . lines

partOne :: Input -> Output
partOne = sum . map (\(n, h) -> n * bid h) . zip [1 .. ] . sort
partOne = sum . map (uncurry (*)) . zip [1 .. ] . map bid . sort

partTwo :: Input -> Output
partTwo = partOne . map convertHand
Expand Down

0 comments on commit c5df9a1

Please sign in to comment.