You could refactor this loop to
```groovy
numChildren.times {
   // …
}
```