title: Prolog function returns duplicate
body: <p>I'm trying to learn prolog and I'm working on a problem where I have two functions:</p>
  
  <pre><code>findSiblings(X,L):-sibling(X,L). 
  sibling(X,Y):-parent(Z,X),parent(Z,Y).
  </code></pre>
  
  <p>Where X and Y are names, and L is the return value. I would like for the <code>findSiblings</code> function to return the name's of X's siblings, and it does. However, the names get printed twice, because it matches both parents. I can't change the <code>sibling</code> function because it depends on a family tree where the only relationships are <code>parent(joe,bob)</code>. Any ideas on how I can solve this issue?</p>
  
  <p>To clarify, say Daniel and Mark are brothers.</p>
  
  <pre><code>findSiblings(daniel,L).
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>Mark;
  Mark
  </code></pre>