var(newState, output) = Operation(state, input);
copyMatrix(newState, state);
var(newState, result) = next(state, item);