Next: , Previous: , Up: Run Intro   [Contents][Index]

3.4 Queries and Directives

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.

Send feedback on this subject.