code: public static <E> Iterator<Tuple2<E, Integer>> withIndex(Iterator<E> self) {
          return withIndex(self, 0);
      }
docs: Zips an iterator with indices in (value, index) order.
  <p/>
  Example usage:
  <pre class="groovyTestCase">
  assert [["a", 0], ["b", 1]] == ["a", "b"].iterator().withIndex().toList()
  assert ["0: a", "1: b"] == ["a", "b"].iterator().withIndex().collect { str, idx {@code ->} "$idx: $str" }.toList()
  </pre>
  
  @param self an iterator
  @return a zipped iterator with indices
  @see #indexed(Iterator)
  @since 2.4.0