static L> listToOverlappingPairs(L l) { new L> out; Iterator it = iterator(l); if (!it.hasNext()) ret out; A a = it.next(); while (it.hasNext()) { A b = it.next(); addPair(out, a, b); a = b; } ret out; }