static LS mapReplaceVars2(LS patterns, final SS map) { ret map(func(S pat) -> S { replaceVars(pat, map) }, patterns); }