sumTo(inclusiveEnd: number): number {
    invariant(
      0 <= inclusiveEnd && inclusiveEnd < this._size,
      'Index out of range %s',
      inclusiveEnd,
    );
    return this.sumUntil(inclusiveEnd + 1);
  }
Returns the sum get(0) + get(1) + ... + get(inclusiveEnd).