static <A, B> LPair<A, B> pairsSortedByA(Collection<Pair<A, B>> l) {
  ret sortedByComparator(l, (a, b) -> cmp(a.a, b.a));
}