mirror of
https://codeberg.org/JasterV/aoc2024-haskell.git
synced 2026-04-26 18:10:05 +00:00
format
This commit is contained in:
parent
6e55a067dc
commit
14ba05fc6c
1 changed files with 2 additions and 4 deletions
|
|
@ -27,10 +27,8 @@ partOne :: String -> IO (Either Error Int)
|
|||
partOne filepath = do
|
||||
result <- try (readFile filepath)
|
||||
case result of
|
||||
Left readError ->
|
||||
return $ Left (ReadFileError filepath readError)
|
||||
Right contents ->
|
||||
return $ calculateScore <$> BF.first ParseInputError (parseInput contents)
|
||||
Left readError -> return $ Left (ReadFileError filepath readError)
|
||||
Right contents -> return $ calculateScore <$> BF.first ParseInputError (parseInput contents)
|
||||
where
|
||||
-- To calculate the overall score we just need to
|
||||
-- sort the lists and calculate the distances between each element
|
||||
|
|
|
|||
Loading…
Reference in a new issue