siblings
- From: "Haris Bogdanovich" <fbogdanovic@xxxxxxx>
- Date: Sat, 1 Oct 2011 13:27:46 +0200
Hi.
I wrote a siblings example:
father_child(tom, sally).
father_child(tom, john).
mother_child(merry, sally).
siblings(X,Y) :-
parent_child(Z,X),
parent_child(Z,Y),
parent_child(X,Y) :-
father_child(X,Y);
mother_child(X,Y).
and when I enter query:
siblings(X,Y).
I also get results:
X=sally
Y=sally
and
X=john
Y=john
How can I add to the siblings rule that
X cannot be equal to Y ?
.
- Follow-Ups:
- Re: siblings
- From: Haris Bogdanovich
- Re: siblings
- From: Feliks
- Re: siblings
- Next by Date: Re: siblings
- Next by thread: Re: siblings
- Index(es):
Relevant Pages
|