// onPercentage: voidfunc(Number)
static ItIt iterateOverListSendingPercentage(O onPercentage, L l) {
ret iff(new O {
int n = l(l), i = 0, lastPercent = 0;
public O get() {
if (i >= n) ret endMarker();
O o = l.get(i++);
int percent = intPercentRatio(i, n);
if (percent > lastPercent)
pcallF(onPercentage, lastPercent = percent);
ret o;
}
});
}