prolog check if element in different lists are same

The solution for “prolog check if element in different lists are same” can be found here. The following code will assist you in solving the problem.

common_list([X],[X]).
common_list([X|Tail],Y):- member(X,Y).
common_list([X|Tail],Y):- common_list(Tail,Y).

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in