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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with my predicate

Status
Not open for further replies.

jodders

Programmer
Nov 12, 2003
13
0
0
GB
heres a list of facts of some names,

king(Name,datefrom,dateto)

king('Bill',1864,1895). %predicates
king('Fred',1895,1901).
king('Joe',1901,1923).
king('Bob',1923,1930).
king('Charlie',1930,1946).

Im trying to write a predicate called ruled_after(X,Y) which is true when King X ruled at some later time than King Y.

Regards
 
rulled_after(X, Y) :-
king(X, F1, _), king(Y, _, T2),
F1 >= T2.


%i haven't tried it, but i guess it's just that..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top