aoc2017-0.1.0.0: Advent of Code 2017 - my answers

Safe HaskellNone
LanguageHaskell2010

Day13

Description

 

Synopsis

Documentation

parse :: String -> [(Int, Int)] Source #

Maps each x: y line in the input to a (x, y) tuple.

combine :: Integral a => ([a], a) -> ([a], a) -> ([a], a) Source #

combine (rs1, q1) (rs2, q2) returns an (rs3, lcm q1 q2) such that

and [r3 `mod` q1 `elem` rs1 && r3 `mod` q2 `elem` rs2 | r3 <- rs3]