title: Getting list of solutions in Prolog
body: <p>I am learning prolog and I am reading a book called Programming Prolog for Artificial Intelligence. As practice I want to learn how to extend one of the examples in this book. Can someone please help?</p>
  
  <p>Say you have these facts:</p>
  
  <pre><code>parent(pam, bob). %pam is a parent of bob
  parent(george, bob). %george is a parent of bob
  </code></pre>
  
  <p>How would I write a prolog predicate that would give me a list of bobs parents? For example:</p>
  
  <pre><code>list_parents(bob, L).
  
  L = [pam, george] ;
  L = [george, pam] ;
  true.
  </code></pre>