code: function(matrix) {
    const rows = matrix.length;
    const columns = matrix[0].length;
    const res = [];
    for (let row = 0; row < rows; ++row) {
      res.push([]);
      for (let column = 0; column < columns; ++column) {
        res[row][column] = matrix[column][columns - row - 1];
      }
    }
    return res;
  }
docs: NB: Taken straight from: https://github.com/IvanVergiliev/2048-react/blob/master/src/board.js with no modification except to format it for CommonJS and fix lint/flow errors