static new ThreadLocal applyNLLogicFacts_v4_iterate_steppable_verbose; static SplittableSteppable applyNLLogicFacts_v4_iterate_steppable(final NLLogicChecker_v2 c, final VF2 onRuleFired, final VF4, Exp> onRuleFailed, L rules) { c.rules = rules; final bool verbose = isTrue(applyNLLogicFacts_v4_iterate_steppable_verbose!); ret splittableSteppable_forEach(rules, voidfunc(final IfThen rule) { pcall { final new NLLogicChecker_v2.Matching m; m.verbose = verbose; if (verbose) print("Checking rule (iterating): " + rule); nlLogic_iterate_withOnFail2(c, rule.in, m, new L, r { if (verbose) { print("Matched " + quote(c.input) + " with rule " + quote(rule)); printStruct(" ", m.matches); } callF(onRuleFired, rule, m); }, voidfunc(L satisfiedConditions, Exp e) { callF(onRuleFailed, rule, m, satisfiedConditions, e) }); }}); }