title: Subset function in prolog
body: <p>I am working on writing a subset function and I have succeeded in doing so. 
  Here's my function which implements member function: </p>
  
  <pre><code> member( X, [ X | T ] ).
   member( X, [ _ | T ] ) :- member( X, T ).
  
   subset([], _).
   subset([H|T1], T2) :-
      member(H, T2),
      subset(T1, T2). 
   subset([H1|T1], [H2|T2]) :-
      \+ member(H1, T2),
      subset([H1|T1], T2).
  </code></pre>
  
  <p>My question is, is there a better way to write this function using the member function of course.</p>