title: SWI-Prolog list result
body: <p>I'm coding in prolog, but I have a issue. How can I make that the answer appears just once? for example I just want that "X = uni, X = uca, X = unam" but instead it just keep showing me the options repeatedly.</p>
  
  <p>This is some of it:</p>
  
  <pre><code>is(uni, college).
  is(uca, college).
  is(unan, college).
  
  is(computation, carrer).
  </code></pre>
  
  <p>In this part I'm assigning available places to the carrer</p>
  
  <pre><code>has(computation, available_places, 200).
  </code></pre>
  
  <p>and finally assigning the carrer to a college</p>
  
  <pre><code>offers(unan, computation).
  offers(uni, computation).
  offers(uca, computation).
  </code></pre>
  
  <p>and I make the query like this:</p>
  
  <pre><code>which(X):- is(X, college), is(Y, carrer), offers(X, Y),has(Y, available_places, Z), Z&lt;300.
  </code></pre>
  
  <p>but the result as I said at the beggining, show me the names of the college repeadtedly. Any idea how to solve this? D:</p>