Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
10 lines (7 sloc) 233 Bytes
member(A, [A|_]).
member(A, [_|Rest]) :- member(A, Rest).
append([], A, A).
append([H|T], L, [H|R1]) :- append(T, L, R1).
% remove one occurance of X from list
select(X, [X|Xs], Xs).
select(X, [Y|Ys], [Y|Zs]) :- select(X, Ys, Zs).