
var ages = [12, 32, 540, 27, 54]
let listIndexes = ages.indices(where: { $0 < 30 })

for value in ages[listIndexes] {
   print(value)
}
ages.removeSubranges(listIndexes)
print(ages)  // [32, 540, 54]
