I’m using: SWI-Prolog version 7.2.3
I want the code to: Return values which are not duplicates
But what I’m getting is: Duplicate values
My code looks like this:
parent(patch,spot).
parent(patch, fluffy).
parent(fang,spot).
parent(patch,tommy).
parent(fang,tommy).
parent(kitty,ranger).
parent(fairy,fang).
parent(frodo,fang).
parent(frodo,kitty).
/* CREATE A RULE FOR FINDING SIBLINGS - this returns the same value twice if the child cat has two shared parents */
sibling(A,B):-
parent(C,A),
parent(C,B),
not(A=B).