Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Defining a rule inside a predicate

Status
Not open for further replies.

stuartmike00

Programmer
Dec 11, 2012
1
0
0
US
Hi everyone.

How do I define a rule inside a prolog predicate?
for example, i want to have a predicate called "marry(A,B)" that defines "married(A,B)", so that when I ask "married(John, Cris)", it will return true if i've said "marry(John, Cris)" before. How do we do that? Thank you!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top