Prolog program to use of list.
domains list=symbol* predicates member(symbol,list) clauses member(X,[X|Tail]). member(X,[Head|Tail]):- member(X,Tail). OUT PUT ======= Goal: member(b,[a,b,c,d]) Yes Goal: member(x,[a,b,c,d]) No Goal: member(X,[a,b,c,d]) X=a X=b X=c X=d 4 Solutions