title: What is the shortest way to run same code n times in Swift?
body: <p>I have a code that I need to run exactly <code>n</code> times in Swift. What is the shortest possible syntax for that?</p>
  
  <p>I am currently using the <code>for</code> loop but it is a lot of typing.</p>
  
  <pre><code>for i in 0..&lt;n { /* do something */ }
  </code></pre>
  
  <p>Is there a shorter/nicer way for running same code <code>n</code> times in Swift?</p>