static S nlLogic_outputFromRuleWithParams(RuleWithParams r) { for (Exp e : nlLogic_unrollAnd(r.rule.out)) { e = nlLogic_applyMatches(e, r.matches); if (e cast Func) if (eqOneOf(e.name, 'output, 'say)) ret nlLogic_text(e.arg); c.checkHelper(e, r.matches); // changes matches e.g. for newID() } null; }