% remove(L,X,M) - M is the result of removing one instance of X from L.

remove([H|T],H,T).
remove([H|T],X,[H|T2]) :- \+(H=X), remove(T,X,T2).
