...and this way:
```scala
    while (partition < rangeBounds.length &&
           implicitly[Ordering[T]].compare(k, rangeBounds(partition)) > 0) {
      partition += 1
    }
```