clause/2
Gets or checks the body of a clause, given its head
clause(HEAD,BODY) -(?,?).
+Head <atom> or <compound_term>
?Body <goal> or <variable>
Compatibility: LPA Win-Prolog.
(but stronger than the LPA Predicate).
This predicate retrieves the clause from the Prolog internal database. Unifies the Head and Body with ones stored in the Prolog internal database.
Remarks:
1) This predicate returns a clause whose head unifies with Head and whose body unifies with Body, and can backtrack to find alternative solutions. Where a clause has no body, a placeholder body of "true" is returned.
2) This is a much "stronger" version of "clause/2" than the built-in predicate "clause/2" of LPA Win-Prolog, since it allows both arguments to be uninstantiated variables (in which case it backtracks to instantiating them in succession, for all possible cases/clauses).