I have a code that I need to run exactly n times in Swift. What is the shortest possible syntax for that?
n
I am currently using the for loop but
for
Shorter and (I think) clearer:
for i in 1...n { } // note: this will fail if n < 1
or
for i in n { }