|
|
|
@ -23,6 +23,6 @@ countHits = length . filterMap lookup . catMaybes .: compose2 (zipWith mzip) may
|
|
|
|
|
treeCharToBool :: Char -> Bool |
|
|
|
|
treeCharToBool = (== '#') |
|
|
|
|
|
|
|
|
|
main = runAoC (fmap (cycle . map treeCharToBool) <$> lines) part1 part2 |
|
|
|
|
main = runAoC (map (cycle . map treeCharToBool) . lines) part1 part2 |
|
|
|
|
where part1 = countHits (3, 1) |
|
|
|
|
part2 = product . (fmap countHits [(1,1), (3,1), (5,1), (7,1), (1,2)] ??) |
|
|
|
|