title: Select Redoing Until Failure, Why?
body: <p>I have the following function: </p>
  
  <pre><code>fillNonDrivers(Car, Pmd, Plo, ListOfPassengers) :-
    select(Passenger, Pmd, Plo1),
    Passenger = [_,n,_],
    /* etc */
  </code></pre>
  
  <p>I invoke it with trace on in the following way:</p>
  
  <pre><code>fillNonDrivers([hello, 2], [[david, n, punk]], PLO, LOP).
   1    1  Call: fillNonDrivers([hello,2],[[david,n,punk]],_29,_30) ? c
   2    2  Call: select(_111,[[david,n,punk]],_112) ? c
   2    2  Exit: select([david,n,punk],[[david,n,punk]],[]) ? c
   2    2  Redo: select([david,n,punk],[[david,n,punk]],[]) ? c
   2    2  Fail: select(_99,[[david,n,punk]],_100) ? c
   1    1  Fail: fillNonDrivers([hello,2],[[david,n,punk]],_29,_30) ? c
   no
  </code></pre>
  
  <p>I do not understand why Redo is called in the above trace. Shouldn't have the select "worked", and thus the next line invoked be</p>
  
  <pre><code> Passenger = [_,n,_],
  </code></pre>
  
  <p>Could someone help explain the appearance of redo here? Thank you in advance.</p>