how to stop repititions in rules in prolog

Posted by Pradeep on Stack Overflow See other posts from Stack Overflow or by Pradeep
Published on 2010-03-17T05:10:26Z Indexed on 2010/03/17 5:11 UTC
Read the original article Hit count: 156

Filed under:

in my prolog rule

marriedcouple(X,Y) :- parent((X,Z),bornin()), parent((Y,Z),bornin()), female(X),male(Y); male(X),female(Y), different(X,Y).

when a parent have two kids. the couple shows two times. how to stop this

© Stack Overflow or respective owner

Related posts about prolog