title: How to run prolog on swipl and return all the traces in one go
body: <p>1: If one query ie. <code>a(X).</code> returns multiple answers, how can I let the program return all the answers and the trace in one go.</p>
  
  <p>2: How can I run a program auto matically i.e  print all answers of <code>a(X).</code> when I load the <code>.pl</code> file to the swipl i.e. after the comman </p>
  
  <pre><code>% swipl -f foo.pl
  </code></pre>
  
  <p>then it return all the answer of <code>X</code></p>
  
  <p>Thank you</p>