title: how can I print all database facts in prolog
body: <p>I have a database in prolog, all I want to do is enuamrate through its element and print one by one. How can this be done?</p>
  
  <pre><code>fact(is(mike,asthmatic)).
  fact(has(andy,highPressure)).
  fact(is(mike,smoker)).
  </code></pre>
  
  <p>I have written this, which works ok but it removes elements from the database, so I want to access them without removing.</p>
  
  <pre><code>print:- 
    retract(factA(P)),
      write(factA(P)),nl,
      fail.
    print.
  </code></pre>