title: How does negation-as-failure works in Prolog?
body: <p>I want to know how Prolog solves this program:</p>
  
  <pre><code>test(X, Y).
  test(X, X):-!, fail.
  </code></pre>
  
  <p>I googled "negation as failure" but I am confused!</p>