Spark style is
```scala
while (ind < smaller) {
```