projects
/
advent-of-code-16.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
749fb83
)
Working version
author
Neil Smith
<neil.git@njae.me.uk>
Sun, 18 Dec 2016 11:01:29 +0000
(11:01 +0000)
committer
Neil Smith
<neil.git@njae.me.uk>
Sun, 18 Dec 2016 11:01:29 +0000
(11:01 +0000)
advent18.hs
patch
|
blob
|
history
diff --git
a/advent18.hs
b/advent18.hs
index 04ab345e5522feb8001434ab9174c3cffdc8e693..a96251a04dc7c511382adcc870ce99a632b8340e 100644
(file)
--- 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