title: How do I return a list in Prolog?
body: <p>Let's say I have these facts:</p>
  
  <pre><code>parent(bob, sam). %bob is sam's parent
  parent(sara, sam). %sara is sam's parent
  </code></pre>
  
  <p>I wanted to find out who were <em>sam</em>'s parents and return them in a list and as such used: </p>
  
  <pre><code>list_parents(P, L) :- findall(Parent, parent(Parent, P), L).
  </code></pre>
  
  <p>What I want to do now is ask the same question but with only one argument as such:</p>
  
  <pre><code>findParents(sam).
  </code></pre>
  
  <p>I tried: </p>
  
  <pre><code>findParents(Name) :- list_parents(Name, L).
  </code></pre>
  
  <p>but this way Prolog simply answers <code>"True"</code>.</p>