title: Prolog function with arity = 0
body: <p>I am trying to write the following in prolog:</p>
  <p>&quot;hasarrow/0 returns true if the Agent has the arrow, and begins to return false after shoot action has been executed by the Agent.&quot;</p>
  <p>The agent starts with having the arrow.</p>
  <p>My code is as follows:</p>
  <pre><code>assert(hasArrow). 
  hasArrow :- (A = shoot -&gt; false ; assert(hasArrow)).
  </code></pre>
  <p>Is this correct?</p>