єм?)
function action ( index, val ) {
let matrixClone = Matrix.clone();
let vectorClone = vector.clone();
vectorClone[index] += val;
matrixClone.swapCells(vector, vectorClone);
children.push(new Node({matrix: matrixClone}));
}
if (vector[0] !== 0) {
action ( 0, -1 );
}