title: not member rule in prolog doesn't work as expected
body: <p>I'm trying to write a simple maze search program in prolog, before I add a room to visited list I'm checking whether it is already a member of the visited list. However, I can't get this to work, even if I use the code from the book:</p>
  
  <pre><code>d(a,b).
  d(b,e).
  d(b,c).
  d(d,e).
  d(c,d).
  d(e,f).
  d(g,e).
  
  
  go(X, X, T).
  go(X, Y, T) :-
      (d(X,Z) ; d(Z, X)),
      \+ member(Z,T),
      go(Z, Y, [Z|T]).
  </code></pre>
  
  <p>What do I do wrong? </p>