wip: day2

This commit is contained in:
Victor Martinez 2025-03-12 09:55:22 +01:00
commit 566a92499a
2 changed files with 19 additions and 0 deletions

View file

@ -26,6 +26,7 @@ source-repository head
library
exposed-modules:
Day1
Day2
other-modules:
Paths_aoc2024
autogen-modules:

18
src/Day2.hs Normal file
View file

@ -0,0 +1,18 @@
module Day2 (partOne, partTwo) where
data Error = ParseError String
deriving (Show)
partOne :: String -> Either Error Int
partOne contents = calculateScore <$> parseInput contents
where
calculateScore _ = 0
partTwo :: String -> Either Error Int
partTwo contents = calculateScore <$> parseInput contents
where
calculateScore _ = 0
parseInput :: String -> Either Error [Int]
parseInput _ = Right []