private Iterator<T> recurse(final T elem, boolean includeHead) {
            if (!traversed.add(elem)) {
              return Collections.emptyIterator();
            }

            if (!includeHead) {
              return tailOf(elem);
            }

            return flat(asIterator(elem), new LazyIterator<T>() {
              @Override
              protected Iterator<? extends T> create() {
                return tailOf(elem);
              }
            });
          }
private Iterator<T> recurse(final T elem, boolean includeHead)