title: How do I deviate backtracking?
body: <p>I have 3, 4 rules like this:</p>
  
  <pre><code>pagaTot(X,Acc,PagaMens):-   giorno(d(X,_,14),[iniziato(I,_,_),_,ListServ|L]),!,
                              length(ListaServ,N),N&lt;2,
                              member(finito(F),L),
                              I&gt;=6, F=&lt;24,
                              I1 is round(I)+round((I-round(I))*100)/60,
                              F1 is round(F)+round((F-round(F))*100)/60,
                              OreTot is F1-I1,
                              OreTot =&lt;8,
                              Paga is (F1-I1)*6,
                              Acc1 is Paga+Acc,X1 is X+1,
                              pagaTot(X1,Acc1,PagaMens).
  
  
  
  pagaTot(X,Acc,PagaMens):-   giorno(d(X,_,14),[iniziato(I,_,_),_,ListServ|L]),!,
                          length(ListaServ,N),N&lt;2,
                          member(finito(F),L),
                          I&gt;=6, F=&lt;24,
                          I1 is round(I)+round((I-round(I))*100)/60,
                          F1 is round(F)+round((F-round(F))*100)/60,
                          OreTot is F1-I1,
                          OreTot &gt;8,
                          OreDa7 is OreTot-8,
                          OreDa6 is OreTot-OreDa7, 
                          Paga is OreDa6*6+OreDa7*7,
                          Acc1 is Paga+Acc,X1 is X+1,
                          pagaTot(X1,Acc1,PagaMens).
  </code></pre>
  
  <p>When the system finds that it's a wrong choice it backtracks. I don't want it to check again for other choices in the first subgoal - 'giorno(d(...'. It better goes strait to the next 'pagaTot(X...' rule this way will be more efficient by about 3, 4 calls for each rule. I tried to put '!' at the end of the first subgoal _,ListServ|L)<strong>,!,</strong> but this cut would not let it go for the next rule. It stops with a total fail.
  I have no other idea where should this cut be put. Is there a solution?  </p>