static SS matchesToMapUsingVarList(Matches m, LS vars) { if (m == null) null; new LinkedHashMap map; int n = min(l(m.m), l(vars)); for i to n: if (!strictPut(map, vars.get(i), m.get(i))) null; ret map; }