title: What does unique means in prolog
body: <p>I am trying to understand the unique predicate:</p>
  
  <p>for example:</p>
  
  <pre><code>unique([H|T],[H|TU]) :- delete(T,E,TN), unique(TN,TU).
  
  delete(T,E,TN) is true if a list TN is identical to a list T
  </code></pre>
  
  <p>after removing all occurrences of an element E.</p>
  
  <pre><code> delete([H|T],H,TN) :- delete(T,H,TN).
   delete([H|T],E,[H|TN]) :- \+ H=E, delete(T,E,TN).
   delete([],_,[]).
  
  
  
  unique(['a','b','a','c'],X).
  
   X = [a, b, c]   &lt;- Enter was pressed
  
   Yes
  </code></pre>
  
  <p>So it comparing two lists
  T = ['a', 'b', 'd', 'f', 't']
  TN =['a', 'b', 'd']</p>
  
  <p>removes the occurrences of common elements </p>
  
  <p>This is the entire code:</p>
  
  <pre><code> % delete(L,E,LN) is true if a list LN is identical to a list L
   % after removing all occurences of an element E.
   delete([H|T],H,TN) :- delete(T,H,TN).
   delete([H|T],E,[H|TN]) :- \+ H=E, delete(T,E,TN).
   delete([],_,[]).
  
   % unique(L,LN) is true if a list LN is identical to a list L
   % without all repeated elements.
   unique([H|T],[H|TU]) :- delete(T,E,TN), unique(TN,TU).
   unique([],[]).
  </code></pre>
  
  <p>please guide here 
  thanks a lot</p>