static L nlLogic_unrollAndApplyRuleWithParams(RuleWithParams r) { new L out; for (Exp e : nlLogic_unrollAnd(r.rule.out)) { e = nlLogic_applyMatches(e, r.matches); if (!nlLogic_checkHelper(e, r.matches)) // changes matches e.g. for newID() out.add(e); } ret out; }