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