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 ‘_’.)


Send feedback on this subject.