Iterator<T> (final T elem) { final Iterable<? extends T> tail = filter(step.fun(elem), new BooleanFunction<T>() { @Override public boolean fun(T e) { return !traversed.contains(e); } }); return flat(tail.iterator(), flat(map(tail.iterator(), new Function<T, Iterator<T>>() { @Override public Iterator<T> fun(T obj) { return recurse(obj, false); } }))); }