

my_member(X, [X | _]) :- !.
my_member(X, [_ | T]) :-
    my_member(X, T).

my_member(1, [5, 3, 2]) % false
my_member(2, [5, 3, 2]) % true
my_member(5, [5, 3, 2]) % true
my_member(0, [])        % false
