Created
May 12, 2020 13:37
-
-
Save tarquin-the-brave/7a068f09d142a317d86ed302a28eea9a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
runInstruction :: Intcode -> Prog Intcode | |
runInstruction ic = do | |
opcodes <- currentOpCode ic | |
case opcodes of | |
(One, m1, m2, m3) -> do | |
newIc <- op1 m1 m2 m3 (ip ic) (code ic) | |
return $ moveIp 4 . updateCode newIc $ ic | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment