static CloseableIterableIterator iteratorFromFunction_f0_autoCloseable(final F0 f, final AutoCloseable closeable) {
class IFF2 extends CloseableIterableIterator {
A a;
bool done;
public bool hasNext() {
getNext();
ret !done;
}
public A next() {
getNext();
if (done) fail();
A _a = a;
a = null;
ret _a;
}
void getNext() {
if (done || a != null) ret;
a = f.get();
done = a == null;
}
public void close() tex {
if (closeable != null) closeable.close();
}
};
ret new IFF2;
}