I found following exercise on www.learnprolognow.org, I tried solving it but haven't been able to:
Write a predicate swap12(List1,List2) which checks whether List1 is identical to List2, except that the first two elements are exchanged.
What I have now:
swap12([X,Y],[Y,X]).
swap12([X,Y|T],[Y,X|Z]) :-
TandZ) different in your second predicate clause if they're the same list other than the first two elements swapped? - lurker