We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8e5091 commit c54656eCopy full SHA for c54656e
2019/05.hs
@@ -36,7 +36,7 @@ operationFromNumber 4 = Just Out
36
operationFromNumber 5 = Just JmpT
37
operationFromNumber 6 = Just JmpF
38
operationFromNumber 7 = Just Less
39
-operationFromNumber 8 = Just Eql
+operationFromNumber 8 = Just Eql
40
operationFromNumber 99 = Just Done
41
operationFromNumber _ = Nothing
42
@@ -118,7 +118,7 @@ applyInstruction (Instruction op modes) (Context mem fptr ins outs) = do
118
let newMem = setMemory dst val mem
119
pure (Context newMem (fptr + 4) ins outs)
120
121
-execute :: Context -> Maybe Context
+execute :: Context -> Maybe Context
122
execute ctx@(Context mem fptr ins outs) = do
123
instruction <- instructionAt fptr mem
124
case op instruction of
0 commit comments