title: How to repeat a statement N times (simple loop)
body: <p>I need to perform an action N times. What is the best way in D to do it?</p>
  
  <pre><code>for(uint i=0; i&lt;N; i++)
     action();
  
  foreach(uint i; 0.. N)
     action();
  </code></pre>
  
  <p>maybe something better? Ideally I'd want something like Groovy's / Ruby's <code>times</code> e.g</p>
  
  <pre><code>N.times {
     action();
  }
  </code></pre>
  
  <p>is it possible?</p>