// returns pair(word, distance) // or null when search step was not successful static ItIt> levenClosestIC_iteratorWithNulls_plusMultiples(LS list, S word, O... _) { if (empty(list)) ret emptyItIt(); ret iff(new F0 { int limit = optPar maxDistance(_, Integer.MAX_VALUE-2); int idx; O get() { if (limit == 0 || idx >= l(list)) ret endMarker(); S s = list.get(idx++); int dist = leven_limitedIC(word, s, limit+1); if (dist <= limit) { limit = dist; ret pair(s, dist); } null; } }); }