Next: Syntax Errors, Previous: Inserting Clauses, Up: Run Intro [Contents][Index]
Queries and directives are ways of directing the system to execute some goal or goals.
In the following, suppose that list membership has been defined by loading the following clauses from a file:
memb(X, [X|_]). memb(X, [_|L]) :- memb(X, L).
(Notice the use of anonymous variables written ‘_’.)
This is similar to how the builtin member/2
is defined.
• Queries | Queries | |
• Directives | Directives |