Reputation: 81
for the question "how to check if the 3 is member of a list" I defined the follow predicate
member(E,[E|_]).
member(E,[_|R] :- member(E,R).
isthreeinlist(L) :- member(3,L).
but how to "check whether 3 OR 4 is member of a list"?
any hint?
(3 AND 4 is easy though).
Upvotes: 0
Views: 7756