aoc2017-0.1.0.0: Advent of Code 2017 - my answers
Day13
Description
Synopsis
parse :: String -> [(Int, Int)] Source #
Maps each x: y line in the input to a (x, y) tuple.
x: y
(x, y)
combine :: Integral a => ([a], a) -> ([a], a) -> ([a], a) Source #
combine (rs1, q1) (rs2, q2) returns an (rs3, lcm q1 q2) such that
combine (rs1, q1) (rs2, q2)
(rs3, lcm q1 q2)
and [r3 `mod` q1 `elem` rs1 && r3 `mod` q2 `elem` rs2 | r3 <- rs3]
day13a :: String -> Int Source #
day13b :: String -> Int Source #