diff --git a/src/vm/virtualMachine.ts b/src/vm/virtualMachine.ts index 58f8188c..5a17ffb0 100644 --- a/src/vm/virtualMachine.ts +++ b/src/vm/virtualMachine.ts @@ -108,9 +108,7 @@ export class VirtualMachine { * - Run the instruction */ step(hints?: Hint[]): void { - if (hints) { - hints.map((hint) => this.executeHint(hint)); - } + hints?.forEach((hint) => this.executeHint(hint)); const maybeEncodedInstruction = this.memory.get(this.pc); if (maybeEncodedInstruction === undefined) { throw new UndefinedInstruction(this.pc);