You might be able to do something like:

population.size().times {
 // insert code here
}