static L> ai_triplesToTripleRefs_lazyList(fS searchTerm, final L l) { if (l == null) null; sclass TTTRList extends LazyList> { final int n = l(l); public int size() { ret n; } public TripleRef get(int i) { TripleWeb w = syncGet(l, i); if (w == null) null; // run-length magic - TODO: concatenated lists int runLength = 0; while (i-runLength > 0 && l.get(i-runLength-1) == w) ++runLength; ret ai_tripleToTripleRef(l.get(i), searchTerm, runLength); // may be null } } ret new TTTRList; }