please include function iteratorFromFunction_withEndMarker.
static IterableIterator iteratorFromFunction_withEndMarker_f0(final F0 f) {
class IFF2 extends IterableIterator {
A a;
bool have, done;
public bool hasNext() {
getNext();
ret !done;
}
public A next() {
getNext();
if (done) fail();
A _a = a;
a = null;
have = false;
ret _a;
}
void getNext() {
if (done || have) ret;
O o = f.get();
if (o == iteratorFromFunction_endMarker)
ret with done = true;
a = (A) o;
set have;
}
};
ret new IFF2;
}