static Pair, Set> applyAttractors_getRuleAndStringEmits(L rules, S s) { new L newRules; Set strings = ciSet(); for unnull (Attractor rule : rules) if (rule.matches(s)) { L emits = getEmits(rule); addAll(newRules, instancesOf Attractor(emits)); addAll(strings, stringsOnly(emits)); } ret pair(newRules, strings); }