code: public void doWithRows(Pairs pairs) {
          if (isEmpty()) {
              return;
          }
          Row row1 = new Row(this);
          Row row2 = new Row(this);
          int max = rowCount();
          for (int i = 1; i < max; i++) {
              row1.at(i - 1);
              row2.at(i);
              pairs.doWithPair(row1, row2);
          }
      }
docs: Applies the function in {@code pairs} to each consecutive pairs of rows in the table