try 

for (b in 0 ..< n) {