Wraps another iterator and throws away nulls.
439882
public static <T> Iterator<T> removeNull(final Iterator<T> itr) {
        return com.google.common.collect.Iterators.filter(itr, Predicates.notNull());
    }
1196278
public static <T> Iterator<T> concat( final Iterator<T> a,
                                          final Iterator<T> b ) {
        assert (a != null);
        assert (b != null);

        return new Iterator<T>() {

            @Override
            public boolean hasNext() {
                return a.hasNext() || b.hasNext();
            }

            @Override
            public T next() {
                if (a.hasNext()) {
                    return a.next();
                }

                return b.next();
            }

            @Override
            public void remove() {
                throw new UnsupportedOperationException();
            }
        };
    }
1351017
public static <T> T last(Iterator<T> iterator) {
		T result = null;
		while(iterator.hasNext()) {
			result = iterator.next();
		}
		return result;
	}
191344
public static <T> LazyIterable<T> concatenate(Iterable<T>... iterables)
    {
        return CompositeIterable.with(iterables);
    }
417297
@NullSafe
  @Override
  public Iterator<VALUE> iterator() {
    return Collections.unmodifiableMap(this.map).values().iterator();
  }
512678
public Iterator iterator() {
        return new Iterator() {
            public boolean hasNext() {
                return false;
            }

            public Object next() {
                return null;
            }

            public void remove() {
                throw new UnsupportedOperationException();
            }
        };
    }
750982
function(items, iterator, done) {
    done = done || function() {};
    var results = [];
    var failure = false;
    var expected = items.length;
    var current = -1;

    function callback(err, result) {
      if (err) return done(err);

      results.push(result);

      if (current == expected) {
        return done(null, results);
      } else {
        next();
      }
    }

    function next() {
      current += 1;

      var item = items[current];
      iterator(item, callback);
    }

    next()
  }
242293
public void throwIfNotEmpty() {
        synchronized (nested) {
            if (nested.isEmpty()) {
                // Do nothing
            } else if (nested.size() == 1) {
                Throwable t = nested.get(0);
                TigerThrower.sneakyThrow(t);
            } else {
                throw this;
            }
        }
    }
1003040
public static <T> Iterator<T> merge(Comparator<T> comp, Iterator<T>... iterators)
    {
        switch (iterators.length)
        {
            case 0:
                throw new IllegalArgumentException("no iterables");
            case 1:
                return iterators[0];
            case 2:
                return new IteratorImpl<>(comp, iterators[0], iterators[1]);
            default:
                return new IteratorImpl<>(comp, iterators[0], merge(comp, Arrays.copyOfRange(iterators, 1, iterators.length)));
        }
    }
168822
function WeakMap_constructor(iterable) { // @arg Iterator|Array = null
    this._index = [];
    this._value = [];

    var that = this;

    if (Array.isArray(iterable)) {
        iterable.forEach(function(value) {
            that["set"](value[0], value[1]);
        });
    } else if (iterable && iterable["next"]) {
        var result = null;

        while ( (result = iterable["next"]()) ) {
            if (result["done"]) {
                break;
            }
            this["set"](result["value"][0], result["value"][1]);
        }
    }
}
240858
public static <T> Iterator<T> merge(Iterator<T>... iterators)
    {
        return merge(null, iterators);
    }
672259
public static <T> T getFirst(Iterator<T> iterator) {
		if (null != iterator && iterator.hasNext()) {
			return iterator.next();
		}
		return null;
	}
70257
public static <T> Iterable<T> wrap(final Iterable<T> base) {
        return new Iterable<T>() {
            public Iterator<T> iterator() {
                final Iterator<T> itr = base.iterator();
                return new Iterator<T>() {
                    public boolean hasNext() {
                        return itr.hasNext();
                    }

                    public T next() {
                        return itr.next();
                    }

                    public void remove() {
                        itr.remove();
                    }
                };
            }
        };
    }
1363322
@Restricted(NoExternalUse.class)
    public static void skip(@Nonnull Iterator<?> iterator, int count) {
        if (count < 0) {
            throw new IllegalArgumentException();
        }
        while (iterator.hasNext() && count-- > 0) {
            iterator.next();
        }
    }
1328789
function(obj, iterator, context) {
        if (!obj) return
        else if (obj.forEach) obj.forEach(iterator)
        else if (obj.length == +obj.length) {
            for (var i = 0; i < obj.length; i++) iterator.call(context, obj[i], i)
        } else {
            for (var key in obj) iterator.call(context, obj[key], key)
        }
    }
62273
public function each($collection=null, $iterator=null) {
    list($collection, $iterator) = self::_wrapArgs(func_get_args(), 2);
    
    if(is_null($collection)) return self::_wrap(null);
    
    $collection = (array) self::_collection($collection);
    if(count($collection) === 0) return self::_wrap(null);
    
    foreach($collection as $k=>$v) {
      call_user_func($iterator, $v, $k, $collection);
    }
    return self::_wrap(null);
  }
336664
public static <E> Optional<E> last(final Iterable<E> iterable) {
        checkNotNull(iterable, "last requires a non null iterable");
        final Iterator<E> iterator = iterable.iterator();
        if (!iterator.hasNext()) {
            return Optional.empty();
        }

        E lastElement;
        do {
            lastElement = iterator.next();
        } while (iterator.hasNext());

        return Optional.of(lastElement);
    }