| License | MIT |
|---|---|
| Maintainer | @tylerjl |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Y2015.D06
Description
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
Arguments
| :: Instruction | Given |
| -> Int | Number of lit lights. |
Execute Instruction and return number of lit lights per part A spec.
Arguments
| :: 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.
Constructors
| Range Point Point |
Arguments
| :: String | Input string to parse. |
| -> [Instruction] | Either an error or parsed structure. |
Parses a string into a list of Instructions.
Arguments
| :: Array U DIM2 Int | Light grid. |
| -> Instruction | Operation |
| -> Array U DIM2 Int | Resultant light grid. |
Folding function to aggregate computation for Instructions per part
|A spec.
Arguments
| :: Array U DIM2 Int | Light grid. |
| -> Instruction | Operation |
| -> Array U DIM2 Int | Resultant light grid. |
Folding function to aggregate computation for Instructions per part
|B spec.