function assignLenses(input) {
const boxes = new Array(256).fill().map(() => ({}));
for (const token of input) {
const instr = parse(token);
const box = hash(instr.label);
if (instr.op === "=") {
boxes[box][instr.label] = instr.val;
} else {
delete boxes[box][instr.label];
}
}
return boxes;
}