Availability:built-in
[ISO]clause(:Head,
?Body)True if Head can be unified with a clause head and Body
with the corresponding clause body. Gives alternative clauses on
backtracking. For facts, Body is unified with the atom true.
Note that SWI-Prolog allows clause/2
to work on both dynamic and static code.95Using clause/2
is disallowed if either the flag iso
or protect_static_code
is true
. Note that clause/2 decompiles
the actual clause and may return a clause that is different from the
source or asserted clause, i.e.,
clause/2
only promises semantic equivalence.