title: Groovy, how to iterate a list with an index
body: <p>With all the shorthand ways of doing things in Groovy, there's got to be an easier way to iterate a list while having access to an iteration index.</p>
  
  <pre><code>for(i in 0 .. list.size()-1) {
     println list.get(i)
  }
  </code></pre>
  
  <p>Is there no implicit index in a basic <code>for</code> loop?</p>
  
  <pre><code>for( item in list){
      println item       
      println index
  }
  </code></pre>