upperBound()

in lib/index.js [207:212]


  upperBound(sum) {
    if (this._countNeg > 0) {
      throw new Error('Sequence is not non-descending');
    }
    return this._find(sum, (x, y) => x <= y);
  }