I've looked through the forum but this problem seems unique. I'm trying to remove the contents of one list from another. For instance:
removed([1,2,3],[2],X).
should give the result X = [1,3]?
So far the code I have come up with is as follows:
removed(L,[],L).
removed([H|T],[H|S],T) :-...
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.