% add(a,[a,b,c],L) has two responses without the cut: % L = [a,b,c] % L = [a,a,b,c] add(X,L,L) :- member(X,L), !. add(X,L,[X|L]).