function* crateMover9000({ stacks, moves, speed = 1 }) {
stacks = Immutable.fromJS(stacks);
yield stacks.toJS();
let count = 0;
for (const move of moves) {
for (let i = 0; i < move.count; i++) {
let newFrom = stacks.get(move.from).pop();
let newTo = stacks.get(move.to).push(stacks.get(move.from).last());
stacks = stacks.set(move.from, newFrom).set(move.to, newTo);
if (++count % speed === 0) yield stacks.toJS();
}
}
yield stacks.toJS();
}