ursus
07/30/2018, 7:50 PMvar i = 0
while (i < Math.min(all.size, maxSize)) {
}
other than while, so I can keep the i var indite the loop scopeLuke
07/30/2018, 8:00 PMdalexander
07/30/2018, 8:03 PMfor (i in 0 until Math.min(all.size, maxSize)) { ... }
is probably similar to what you are looking for.ursus
07/30/2018, 8:05 PMkarelpeeters
07/30/2018, 8:06 PMi
isn't simply being incremented every iteration... You could write a custom iterator or create an extra scope with run
.