static LL ai_spreadCertainIndices_2(L tokPat, L tokS, L indices) { int extra = (l(tokS)-l(tokPat))/2; if (extra < 0 || empty(indices)) ret emptyList(); new LL results; for (L spread : allSpreads(extra, l(indices))) { new L tok; int pos = 0, iSpread = 0, iIndices = 0; for i over tokPat: if (!eq(get(indices, iIndices), i)) tok.add(tokS.get(pos++)); else { ++iIndices; int take = spread.get(iSpread++)*2; tok.add(joinSubList(tokS, pos, pos+take+1)); pos += take+1; } results.add(tok); } ret results; }