static CloseableIterableIterator iterate_progressWindow(final Collection l) { final JProgressBar bar = showProgressWindow(l(l)); ret iteratorFromFunction_withEndMarker_f0_autoCloseable(new F0 { int i; Iterator it = iterator(l); NotTooOften nto = onlyTenTimesASecond(); public O get() { if (!it.hasNext()) ret endMarker(); if (i > 0 && nto.yo()) { setProgressBarValue(bar, i); // TODO: set window title too } ++i; ret it.next(); } }, tempDisposePIFrame(bar)); }