membchk(X,[X|_]) => true. membchk(X,[_|Ys]) => membchk(X,Ys).This predicate checks whether an element that is given as the first argument occurs in a list that is given as the second argument. The head of the first clause membchk(X,[X|_]) matches any call whose first argument is identical to the first element of the list. For instance, the calls membchk(a,[a]) and membchk(X,[X,Y]) succeed, and the calls membchk(a,Xs), membchk(a,[X]), and membchk(X,[a]) fail.