From: Neil Smith Date: Sun, 18 Dec 2016 11:01:29 +0000 (+0000) Subject: Working version X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=ef96d1a9007791a22f857e9c88fa462e093ce7fd;p=advent-of-code-16.git Working version --- diff --git a/advent18.hs b/advent18.hs index 04ab345..a96251a 100644 --- a/advent18.hs +++ b/advent18.hs @@ -4,13 +4,11 @@ import Data.List (iterate, tails) -- input = ".^^.^.^^^^" input = "^.^^^.^..^....^^....^^^^.^^.^...^^.^.^^.^^.^^..^.^...^.^..^.^^.^..^.....^^^.^.^^^..^^...^^^...^...^." - main :: IO () main = do part1 part2 - part1 :: IO () -- part1 = putStrLn $ unlines $ map (showRow) $ take 10 $ iterate nextRow $ readRow input part1 = print $ length $ filter (not) $ concat $ take 40 $ iterate nextRow $ readRow input