static L lambdaMapLike genericStreaks(IIntPred pred, int n) { new L out; int i = 0; while (i < n) { int j = i; while (j < n && pred.get(j)) ++j; if (j > i) out.add(intRange(i, j)); i = j+1; } ret out; } static L lambdaMapLike genericStreaks(int n, IIntPred pred) { ret genericStreaks(pred, n); }