Amzi! Prolog's built-in predicate is_member/2, per its documentation, is deterministic and simply tests membership. It won't return all members of the list on backtracking:
is_member/2 is a restricted version of the classic member/2 predicate (in the
LIST.PLM library) than [sic] can be used for fast testing if Term is a member of List.
It uses a strong unify (==) for testing the element.
It cannot be used to backtrack through the various members of a list.
The definition is equivalent to:
is_member(X, [Y|_]) :- X == Y, !.
is_member(X,[_|Z]) :- is_member(X,Z).
As @hardmath noted in another answer, the classic member/2 is part of Amzi! Prolog's list library. However, Prolog is [mostly] written in Prolog, so you can easily roll your own member/2 having to import the list library:
member( X , [X|_] ) .
member( X , [_|Xs] ) :- member(X,Xs) .
member/2doesn't work. It would be like saying(1 + 2) == 3wasn't working in C. Perhaps you could provide more context, describing where you are actually queryingmember(1, [1,2,3]). Is it inside another predicate you've written? Are you just typing that in exactly at an Amzi prolog interpreter prompt (not forgetting the terminating period.!). You have really provided very little information. - lurkermember/2undefined, and undefined predicates simply return False (unlike with SWI-Prolog reporting undefined predicates as errors). See more details in my Answer. - hardmath