diff options
-rw-r--r-- | 7-1.hs | 4 | ||||
-rw-r--r-- | 7-2.hs | 4 |
2 files changed, 2 insertions, 6 deletions
@@ -17,6 +17,4 @@ result xs = sum . map fst . filter snd $ zip (map fst xs) (map (uncurry check) xs) main :: IO () -main = do - ls <- lines <$> getContents - print . result . map parseLine $ ls +main = getContents >>= print . result . map parseLine . lines @@ -20,6 +20,4 @@ result xs = sum . map fst . filter snd $ zip (map fst xs) (map (uncurry check) xs) main :: IO () -main = do - ls <- lines <$> getContents - print . result . map parseLine $ ls +main = getContents >>= print . result . map parseLine . lines |