title: How do I iterate over a range with a custom step?
body: <p>How can I iterate over a range in Rust with a step other than <code>1</code>? I'm coming from a C++ background so I'd like to do something like</p>
  <pre><code>for(auto i = 0; i &lt;= n; i+=2) {
      //...
  }
  </code></pre>
  <p>In Rust I need to use the <code>range</code> function, and it doesn't seem like there is a third argument available for having a custom step. How can I accomplish this?</p>