Main
Description
https://adventofcode.com/2017/day/5
main :: IO () Source #
part1 :: Int -> Int Source #
Update rules
part2 :: Int -> Int Source #
solve Source #
Arguments
update rule
initial program
steps required
Compute the number of steps until the program terminates given an update rule.
>>> solve part1 [0,3,0,1,-3] 5 >>> solve part2 [0,3,0,1,-3] 10
>>>
solve part1 [0,3,0,1,-3]
solve part2 [0,3,0,1,-3]