query method
Queries the database with goal, yielding unified solution terms.
Implementation
Iterable<Node> query(Term goal) {
final candidates = rules[goal.name];
if (candidates == null) return const [];
return candidates.expand((rule) => rule.query(this, goal));
}