@Override
            public S next() {
                final S next = iterator.next();
                function.accept(next);
                return next;
            }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/iterator/IteratorUtils.java