title: Prolog- singleton variable in branch warning
body: <p>Hello here is my code in Prolog:</p>
  
  <pre><code>arc(a,h).
  arc(b,c).
  
  related_to(X, Ys) :-
     setof(Y, arc(X, Y), Ys).
  
  cut([H|T],Y) :- 
      check(H,Y),
  
      T = [] -&gt;   cut(T,Y).
  
  check(X,Y) :-
      related_to(X,Xs),
      member(Y,Xs) -&gt;  write('There is a road');
      cut(Xs,Y).
  </code></pre>
  
  <p>When I am trying to run <code>check(a,b)</code> it doesn't run. I get the message</p>
  
  <pre><code>Singleton variable in branch: Xs
  </code></pre>
  
  <p>When I am not using cut question, I don't get any error. I would be grateful for pointing me where I made a mistake and showing way to repair it.</p>