static S replaceNumbersWithVars(S s, final F0 varMaker) { final new SS map; ret regexpReplace(s, "\\d+", func(Matcher m) -> S { S number = m.group(); S var = map.get(number); if (var == null) map.put(number, var = varMaker!); ret var; }); }