Declarative uses of memberchk/2
memberchk/2 is a commonly defined predicate that is defined in terms of member/2 like so: memberchk(X, Xs) :- once(member(X, Xs)). It therefore succeeds only for the first answer of member/2 . Its full procedural meaning does not fit into a pure relation. As an example for its non-relational behavior consider ?- memberchk(b, [X,b]), X = a. false. ?- X = a, memberchk(b, [X,b]). X = a. On the other hand, in many cases memberchk/2 will be called with sufficiently instantiated arguments, where it can be seen as an efficient approximation of a pure relation. One such pure relation behind is memberd