static L overlappingIntPairs(L l) { new L out; Iterator it = iterator(l); if (!it.hasNext()) ret out; int a = it.next(); while (it.hasNext()) { int b = it.next(); out.add(IntPair(a, b)); a = b; } ret out; }