I am very new to prolog and I was wondering if am on the right approach to my programs specifications. I need to remove the duplicates from a list.
remove_duplicates([],_).
remove_duplicates([X|XS], Y) :-
member(X,Y),
remove_duplicates(XS,Y), !.
remove_duplicates([X|XS], Y) :-...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.