X is a member of list L if L = [...., X, ...].

Calling the first ... part A and the second ... part B, we see that L = A ++ [X] ++ B.

But [X] ++ B is the list whose head is X and whose tail is B. That is, X ++ [B] = [X|B].

So we want L = A ++ [X|B]. That is,

   member(X,L) :- append(A,[X|B], L).