static LPair overlappingPairs_lazy(L l) { if (l == null) null; class OverlappingPairs extends LazyList> { final int n = max(0, l(l)-1); public int size() { ret n; } public Pair get(int i) { ret pair(l.get(i), l.get(i+1)); } } ret new OverlappingPairs; }