| |||||||||||
| retracts from the database the clauses which are unifiable with the argument.
retract(+Clause)
retract/1 retracts the first clause from the database which is unifiable with Clause .
If Clause is an atom or compound term whose principal functor is
different from ':-'/2 then Clause is the head and 'true' is the body
of the clause.
Arguments
Clause atom or compound term
Examples
Assume that the database contains the clauses:
colour(blue).
colour(yellow).
colour(blue,yellow,green).
add(X,Y,Z) :- Z is X+Y.
f(a).
f(a) :- b.
Standard
This predicate is part of the ISO-Prolog Standard.
See alsoasserta/1, assertz/1, abolish/1, collect/3, load/1, unload/1, load/1/2, retractall/1. | |||||||||||
| |||||||||||
| Back> |
|