What I want when I define:
marriedTo(martin, annie).
He also does the following true:
marriedTo(annie, martin).
I tried the following, but this is an (obviously) infinite loop.
marriedTo(X,Y) :- marriedTo(Y,X).
How can I do this in Prolog?
source share