code: public static <T> Iterator<T> init(Iterator<T> self) {
          if (!self.hasNext()) {
              throw new NoSuchElementException("Cannot access init() for an empty Iterator");
          }
          return new InitIterator<T>(self);
      }
docs: Returns an Iterator containing all of the items from this iterator except the last one.
  <pre class="groovyTestCase">
  def iter = [3, 4, 2].listIterator()
  def result = iter.init()
  assert result.toList() == [3, 4]
  </pre>
  
  @param self an Iterator
  @return an Iterator without the last element from the original Iterator
  @throws NoSuchElementException if the iterator is empty and you try to access init()
  @since 2.4.0