From 52465a9380e0b31c10298625cff6d9c8b4743328 Mon Sep 17 00:00:00 2001 From: Xiretza Date: Sun, 6 Dec 2020 18:52:15 +0100 Subject: [PATCH] day4/haskell: prettify --- 2020/day4/day4.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2020/day4/day4.hs b/2020/day4/day4.hs index a3a297c..83aedf0 100644 --- a/2020/day4/day4.hs +++ b/2020/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))