title: Prolog factorial predicate
body: <p>I have a factorial predicate<code>fact(N,F)</code>, where either <code>N</code> or <code>F</code> or both are bounded to a number.</p>
  
  <p>For example I can have <code>fact(3,F)</code> or <code>fact(N,6)</code>.
  Here is my predicate, which works but I don't really understand how. I used <code>trace</code> but still have problems understanding it.</p>
  
  <pre><code>fact(0,1).
  fact(N,F) :-
          fact(N1,F1),
          N is N1 + 1,
          F is N * F1.
  </code></pre>