title: A predicate that checks the output of another predicate?
body: <p>I have a predicate which checks for duplicates in a list and returns true if there are no duplicates and false if there are duplicates present:</p>
  
  <pre><code>removeDups([], []).
  removeDups([H|T], [H|T1]) :- subtract(T, [H], T2), removeDups(T2, T1).
  </code></pre>
  
  <p>I want to write another predicate that will basically check if removeDups successfully removes duplicates from a list whilst leaving the other list items present still. So for example a predicate testRemoveDuplicates/1 where the input is a list. I'm not sure how to go about doing this though.</p>
  
  <p>Thanks in advance.</p>