Iterator<E> () { return new JBIterator<E>() { E cur1 = first1; E cur2 = first2; @Override public E nextImpl() { E result = cur1; cur1 = cur2; cur2 = generator.fun(result, cur2); if (result == null) return stop(); return result; } }; }