static L> mapDoubleArrowsToPairs(L l) { new L> out; for (S s : l) { L x = splitAtDoubleArrow(s); if (l(x) == 2) out.add(listToPair(x)); } ret out; }