day4/haskell: prettify

This commit is contained in:
Xiretza 2020-12-06 18:52:15 +01:00
parent f717860fe3
commit 52465a9380

View file

@ -94,4 +94,4 @@ hasAllRequiredFields = maybe False containsAllFields . fieldNames
containsAllFields fields = all (`elem` fields) requiredFieldNames containsAllFields fields = all (`elem` fields) requiredFieldNames
fieldNames = oneCompleteResult parseFieldNames fieldNames = oneCompleteResult parseFieldNames
main = runAoC (filter hasAllRequiredFields . map (intercalate " ") . splitOnEmptyLines) (length) (length . mapMaybe (oneCompleteResult parsePassport)) main = runAoC (filter hasAllRequiredFields . map unwords . splitOnEmptyLines) length (length . mapMaybe (oneCompleteResult parsePassport))