Browse Source

day4/haskell: prettify

main
Xiretza 1 year ago
parent
commit
5fdccf79ab
Signed by: xiretza
GPG Key ID: 17B78226F7139993
  1. 2
      day4/day4.hs

2
day4/day4.hs

@ -94,4 +94,4 @@ hasAllRequiredFields = maybe False containsAllFields . fieldNames
containsAllFields fields = all (`elem` fields) requiredFieldNames
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))

Loading…
Cancel
Save