PLOGHELP CLAUSE                               Chris Mellish, August 1982
                                Revised by Kathryn Seifert  October 1986

Predicate that succeeds if a clause with given body and head is in
database

    ?- clause(Head, Body).

Keywords: body, head, clause, database


A goal of the form
    ?- clause(Head, Body)
will succeed if there is a clause in the database with given Head and
Body. This goal may be resatisfied if there are several clauses whose
heads and bodies match Head and Body. In the first solution, Head and
Body will be instantiated to the first such clause. Subsequent solutions
instantiate Head and Body to all the others in the same order as the
clauses appear.

If there is a clause in the database whose head matches Head, but has no
body (i.e. it is a fact such as   mother(frances). ) then Body will be
instantiated to 'true' (see PLOGHELP * TRUE).

When this predicate is called, Head should be instantiated enough that
the main predicate of the clause is known.

-- RELATED DOCUMENTATION ----------------------------------------------

PLOGHELP * DATABASE
 Overview of Prolog database operations
