code: public static <T> Iterator<T> each(Iterator<T> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure closure) {
          while (self.hasNext()) {
              Object arg = self.next();
              closure.call(arg);
          }
          return self;
      }
docs: Iterates through an Iterator, passing each item to the given closure.
  
  @param self    the Iterator over which we iterate
  @param closure the closure applied on each element found
  @return the self Iterator
  @since 2.4.0