succ prec
indice
Predicato "foil/2"
*
/******************************************************************/
/* */
/* call : foil (+PREDICATE) */
/* */
/* arguments : PREDICATE = Either a most general predicate or */
/* a Prolog functor */
/* e.g. predicate(_,_) or predicate/2 */
/* */
/******************************************************************/
/* Run FOIL to attempt finding a definition for PREDICATE and */
/* then print out the resulting clauses. */
/******************************************************************/
foil(Name/Arity) :-
functor(Predicate,Name,Arity),
!,
foil(Predicate).
foil(Goal) :-
foil(Goal,Clauses),
nl, write('Found definition:'), nl,
portray_clauses(Clauses).
*
succ prec
indice