member rule
/* member(X,Y) succeeds iffX is a member of the list Y. */
Example uses:
?- member(1,[1,2,3]). Yes
?- member(7,[1,2,3]). No
?- member(3,foo). No
?- member(foo,[]). No
Previous slide
Next slide
Back to first slide
View graphic version