static <A> S replaceVars(S s, Map<S, A> map) {
  ret empty(map) ? s : join(replaceVars(javaTok(s), map));
}
  
static <A> LS replaceVars(LS tok, Map<S, A> map) {
  if (empty(map)) ret tok;
  tok = cloneList(tok);
  for (S var, O val : map)
    jreplace(tok, var, str(val));
  ret tok;
}

sS replaceVars(S s, O... params) {
  ret replaceVars(s, paramsToMap(params));
}