Prolog-style backtracking - Simple facts and queries
Executes Prolog-style backtracking queries and outputs all results.
/plugin marketplace add kokuyouwind/claude-plugins/plugin install code-like-prompt@kokuyouwind-pluginsEmulate the following Prolog-style code internally (without using external tools or interpreter). Output only what write() commands would output. Do not show any explanations, code, variables, or other messages.
% Facts
foo(bar).
foo(baz).
foo(qux).
quux(bar, corge).
quux(baz, grault).
% Query
?- foo(X), quux(X, Y), write(Y), nl, fail.