title: Discontiguous predicate warning from GNU Prolog
body: <p>For a lark I have started learning Prolog via <a href="http://www.learnprolognow.org/">http://www.learnprolognow.org/</a>. My excuse is that I have only <em>just</em> started.</p>
  
  <p>I am unsure of how the following (simple?) exercise should be written to work as expected.
  <a href="http://cs.union.edu/~striegnk/learn-prolog-now/html/node13.html#sec.l1.exercises">http://cs.union.edu/~striegnk/learn-prolog-now/html/node13.html#sec.l1.exercises</a> </p>
  
  <p>I can see that Gnu Prolog 1.4 ( <a href="http://www.gprolog.org/">http://www.gprolog.org/</a> ) is not happy that the 2nd predicate for wizard\1 is not next to the first one. I can re-order the program to make it work but then I end up with code which to my novice Prolog eye is less understandable than the one presented below.</p>
  
  <p>Am I missing something obvious?</p>
  
  <p>wiz.pl</p>
  
  <pre><code>wizard(ron).
  hasWand(harry).
  quidditchPlayer(harry).
  
  wizard(X) :- hasBroom(X),hasWand(X).
  hasBroom(X) :- quidditchPlayer(X).
  </code></pre>
  
  <p>consult wiz.pl</p>
  
  <pre><code>| ?- [wiz].
  compiling D:/wiz.pl for byte code...
  D:/wiz.pl:5: warning: discontiguous predicate wizard/1 - clause ignored
  D:/wiz.pl compiled, 5 lines read - 632 bytes written, 24 ms
  </code></pre>