Currently `Prolog.query()` stops after it finds a single matching substitution. A real Prolog engine needs a way to continue and produce all matches.