sS firstMatchesX_rest(S pat, Iterable l) { new Matches m; for (S s : unnull(l)) if (matchX(pat, s, m)) ret m.rest(); null; }