Notice that the method will actually iterate over the enumerator
 @param enumerator [Enumerator]
485086
def valid?(enumerator)
      return false unless Is[Enumerator].valid?(enumerator)

      enumerator.all? { |obj| Is[type].valid?(obj) }
    end
293447
def delete_if #:nodoc: :yield: line
      # Do in two steps to not mess up progress through the enumerator.
      rm = []

      each do |f|
        line = f2l(f)
        if line && yield(line)
          rm << f

          # Hack - because we treat N and FN as one field
          if f.name? "N"
            rm << field("FN")
          end
        end
      end

      rm.each do |f|
        @fields.delete( f )
        @cache.delete( f )
      end

    end
1040864
def enumerator
      response = get_initial_response
      Enumerator.new do |yielder|
        loop do
          response.records.each { |item| yielder << item }

          after_cursor = response.after
          break if after_cursor.nil?

          @options[:params] ||= {}
          @options[:params] = @options[:params].merge(after: after_cursor)
          response = @service.list(@options.merge(after: after_cursor))
        end
      end.lazy
    end
1096391
public static <E> RubyEnumerator<E> copyOf(Iterable<E> iter) {
    Objects.requireNonNull(iter);

    return new RubyEnumerator<>(RubyArray.copyOf(iter));
  }
321942
function ReferenceIterator(iterable) {
            _classCallCheck(this, ReferenceIterator);

            this.iterator = null;
            var artifacts = new IterationArtifacts(iterable);
            this.artifacts = artifacts;
        }
575458
def each_with_index
      return to_enum unless block_given?
      start_index = -1
      data.each do |row|
        yield row.to_a, start_index += 1
      end
      self
    end
1014865
@Override
  public RubyEnumerator<E> each(Consumer<? super E> block) {
    iter.forEach(block);
    return this;
  }
644096
def each
      raise Erlang::ImproperListError if improper?
      return to_enum unless block_given?
      list = self
      until list.empty?
        yield(list.head)
        list = list.tail
      end
      return self
    end
188869
public Iterator<E> iterator() {

        return new Iterator<E>() {

            public boolean hasNext() {
                return enumeration.hasMoreElements();
            }

            public E next() {
                return enumeration.nextElement();
            }

            public void remove() {
                throw new UnsupportedOperationException("IterableEnumeration does not support remove");
            }
        };
    }
459787
public function removeIterable(iterable $enumerators): void
    {
        $map = $this->map;
        foreach ($enumerators as $enumerator) {
            $ord = ($this->enumeration)::get($enumerator)->getOrdinal();
            unset($map[$ord]);
        }

        $this->map = $map;
    }
644909
def trees
      Enumerator.new do |yielder|
        remaining = [self]
        remaining.each do |woods|
          next yielder << woods if woods.is_a?(Tree)

          woods.each { |wood| remaining << wood }
        end
      end
    end
444437
def visit_EnumeratorList(self, node):
        """"""
        for type, enum in node.children():
            if enum.value is None:
                pass
            elif isinstance(enum.value, (c_ast.BinaryOp, c_ast.UnaryOp)):
                enum.value = c_ast.Constant("int", "...")
            elif hasattr(enum.value, "type"):
                enum.value = c_ast.Constant(enum.value.type, "...")
1317592
public static <E> Enumeration<E> asEnumeration(Iterator<E> iter) {
		return new IteratorEnumeration<E>(iter);
	}
964361
def Skip(self: Iterable, n):
    
    con = iter(self)
    for i, _ in enumerate(con):
        if i == n:
            break
    return con
141276
def each
      return enum_for(__method__) unless block_given?

      @node.xpath('hop').each do |hop|
        yield Hop.new(hop['ipaddr'],hop['host'],hop['ttl'],hop['rtt'])
      end

      return self
    end
86606
public static <T> Iterator<T> iterator(Enumeration<T> enumeration) {
		return new Iterator<T>() {
			@Override
			public boolean hasNext() {
				return enumeration.hasMoreElements();
			}
			
			@Override
			public T next() {
				return enumeration.nextElement();
			}
		};
	}
264455
public static <E> RubyEnumerator<E> of(Iterable<E> iter) {
    Objects.requireNonNull(iter);

    return new RubyEnumerator<>(iter);
  }