day09: switch to interact
needs more golfing also interact is probably better anyway
This commit is contained in:
parent
0e134abdaa
commit
b8a31b37a6
|
@ -1,9 +1,7 @@
|
||||||
import Control.Arrow
|
import Control.Arrow
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = interact $ show . (day09 &&& day09 . map reverse) . parse
|
||||||
input <- parse <$> readFile "input"
|
|
||||||
print $ (day09 &&& day09 . map reverse) input
|
|
||||||
|
|
||||||
parse :: String -> [[Int]]
|
parse :: String -> [[Int]]
|
||||||
parse = map (map read . words) . lines
|
parse = map (map read . words) . lines
|
||||||
|
|
Loading…
Reference in New Issue
Block a user