member(K,[a,b,c,d])
if for one of ...
What's the statement for two of ...?
member(K,[a,b,c,d])
if for one of ...
What's the statement for two of ...?
Just rinse and repeat:
List = [a,b,c,d],member(X,List),member(Y,List).
If you want two distinct elements then,
List = [a,b,c,d],member(X,List),member(Y,List),X \== Y.
Then wrap it up in a predicate if that's what you're after:
two_members(X,Y,List) :-
member(X,List),
member(Y,List),
X \== Y.