sclass AI_ExecuteSimpleForWhere implements Steppable { ForWhere fw; DeepZipTools tools; S functionName; Iterator elements; swappable void addLogicRule(BasicLogicRule rule) {} swappable Iterable elementsForFunction(S functionName) { null; } public bool step() { if (elements == null) { Pair p = forWhereParseSimpleFunctionCall(fw, tools); if (p == null) true; functionName = (S) p.a; elements = iterator(elementsForFunction(functionName)); } if (!elements.hasNext()) true; addLogicRule((BasicLogicRule) tools.replaceVars(fw.body, litmap(var, elements.next()))); } }