Hello all, I need an argument correct(L, X, NL) where L is a list of names, X is a name that exists twice in L and NL is the new list with the name X once.
I wrote this:
correct([], _, _).
correct([H|T], X, NL):-
NL= [H|NL1],
not(member(X, NL))...
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.