License | MIT |
---|---|
Maintainer | @tylerjl |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Solutions to the day 06 set of problems for adventofcode.com.
Synopsis
- testA :: Instruction -> Int
- testB :: Instruction -> Int
- data Instruction
- data Range = Range Point Point
- parseInstructions :: String -> [Instruction]
- configureGridA :: Array U DIM2 Int -> Instruction -> Array U DIM2 Int
- configureGridB :: Array U DIM2 Int -> Instruction -> Array U DIM2 Int
- lightSimulation :: Foldable t => (Array U DIM2 Int -> a -> Array U DIM2 Int) -> t a -> Int
Documentation
:: Instruction | Given |
-> Int | Number of lit lights. |
Execute Instruction
and return number of lit lights per part A spec.
:: Instruction | Given |
-> Int | Number of lit lights. |
Execute Instruction
and return number of lit lights per part B spec.
Represents a two-dimensional range of lights.
Range Point Point |
:: String | Input string to parse. |
-> [Instruction] | Either an error or parsed structure. |
Parses a string into a list of Instruction
s.
:: Array U DIM2 Int | Light grid. |
-> Instruction | Operation |
-> Array U DIM2 Int | Resultant light grid. |
Folding function to aggregate computation for Instruction
s per part
|A spec.
:: Array U DIM2 Int | Light grid. |
-> Instruction | Operation |
-> Array U DIM2 Int | Resultant light grid. |
Folding function to aggregate computation for Instruction
s per part
|B spec.