Rewrites every instruction.
Program to map.
Returns the replacement for each instruction.
A new program; the input is left untouched.
const redacted = map(program, (instruction) => instruction.opcode === Opcode.TXT_CHUNK ? redact(instruction) : instruction,); Copy
const redacted = map(program, (instruction) => instruction.opcode === Opcode.TXT_CHUNK ? redact(instruction) : instruction,);
Rewrites every instruction.