title: Can't form Range with end < start Check range before doing for loop?
body: <p>I'm encountering a change in the swift code which i do not quite understand. </p>
  
  <pre><code>var arr = []
  for var i = 1; i &lt;= arr.count; i += 1
  {
      print("i want to see the i \(i)")
  }
  </code></pre>
  
  <p>I have a program that gets an result array which can also be empty. This is no problem with the for loop above. 
  Now apple wants me to change the code into the following. But this will crash if the array is empty. </p>
  
  <pre><code>var arr = []
  for i in 1...arr.count
  {
     print("i want to see the i \(i)")
  }
  </code></pre>
  
  <p>Do I really have to check the range first before i do a loop like?</p>
  
  <pre><code>var arr = []
  if (arr.count &gt;= 1){
      for i in 1...arr.count
      {
          print("I want to see the i \(i)")
      }
  }
  </code></pre>
  
  <p>Is there a smarter solution? </p>