title: How to make a reverse ordered for loop?
body: <blockquote>
    <p>Editor's note: This question was asked before Rust 1.0 was released and the <code>..</code> "range" operator was introduced. The question's code no longer represents the current style, but some answers below uses code that will work in Rust 1.0 and onwards.</p>
  </blockquote>
  
  <p>I was playing on the <a href="https://rustbyexample.com/flow_control/for.html" rel="noreferrer">Rust by Example website</a> and wanted to print out fizzbuzz in reverse. Here is what I tried:</p>
  
  <pre><code>fn main() {
      // `n` will take the values: 1, 2, ..., 100 in each iteration
      for n in std::iter::range_step(100u, 0, -1) {
          if n % 15 == 0 {
              println!("fizzbuzz");
          } else if n % 3 == 0 {
              println!("fizz");
          } else if n % 5 == 0 {
              println!("buzz");
          } else {
              println!("{}", n);
          }
      }
  }
  </code></pre>
  
  <p>There were no compilation errors, but it did not print out anything. How do I iterate from 100 to 1?</p>