sln_2017_23
Copyright(c) Eric Mertens 2017
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Main

Description

https://adventofcode.com/2017/day/23

Part 1 is just a copy/paste of day 18

Part 2 was done with manual analysis. My program counted the number of composite numbers in the range [108100, 108117 .. 125100]

Synopsis

Documentation

data C Source #

Constructors

Cset 
Cjnz 
Cmul 
Csub 

Instances

Instances details
Show C Source # 
Instance details

Defined in Main

Methods

showsPrec :: Int -> C -> ShowS #

show :: C -> String #

showList :: [C] -> ShowS #

main :: IO () Source #

>>> :main
6241

(!) Source #

Arguments

:: Map Char Integer

registers

-> Either Char Integer

number or register

-> Integer

argument value

Either lookup a register or return the value of a constant.

runProgram Source #

Arguments

:: Vector (C, Either Char Integer, Either Char Integer)

instructions

-> Int

multiplies