!7 p-exp { final IfThen rule = nlLogic_parseRuleWithMacros([[ i(can you $walk_on_water?) && fact(nobody can $walk_on_water) => say(no. nobody can $walk_on_water) ]]); final new NLLogicChecker_v3 c; c.input = "can you look around corners?"; final new NLLogicChecker_v2.Matching m; m.verbose = true; final L l = nlLogic_unrollAnd(rule.in); if (l == null) ret with print("No conditions"); print("Conditions: " + l); // WORKS c.iterate(first(l), m, r { print("Got match: " + sfu(m.matches)); print("Remaining conditions: " + c.apply(nlLogic_and(dropFirst(l)), m); print("Remaining rule: " + c.apply(IfThen(nlLogic_and(dropFirst(l)), rule.out), m)); }); // WORKS in this case, but iterate is better print("Method 2"); if (c.checkExpression(first(l), m)) { print("Got match: " + sfu(m.matches)); print("Remaining: " + c.apply(nlLogic_and(dropFirst(l)), m)); } }