searches clauses in the database of the public user-defines procedures.
clause/2 searches in the database of the public user-defined predicates for clauses with a head which is unifiable with Head. By backtracking Head gets unified with the head of a clause and Body gets unified with its body.
Head atom or compound term Body term
Assume there exists a database with the following user-defined predicates:
language(english). language(X) :- translate(X,Y), language(Y). translate(english, japanese).
| clause(language(A),Body). | Succeeds with substitution A <- english and Body <- true. When backtracking it succeeds a second time with substitution A < V1 and Body <- (translate(V1,V2), language(V2)). |
This predicate is part of the ISO-Prolog Standard.