diff --git a/src/Day1.hs b/src/Day1.hs index d8ceb57..be69493 100644 --- a/src/Day1.hs +++ b/src/Day1.hs @@ -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