PPT Slide
mem(Q,[1,2,3])
A
/*A*/ mem(X,[X|_]).
/*B*/ mem(X,[_|T]) :- mem(X,T).
*
Multiple solutions trace 7
mem(Q,[2,3])
B
A
mem(Q,[3])
B
A
Matches A,
unify [Q|_]with [3]
Q = 3
Previous slide
Next slide
Back to first slide
View graphic version