<div>Take the code below in the ANSI test suite. I interpret the specification as follows: if :FROM-END is supplied but :COUNT is not, the implementation is free to choose a different inspection order, in particular because it might be more efficient!</div>

<div><br></div><div>"Supplying a from-end of true matters only when the count is provided (and non-nil); in that case, only the rightmost count elements satisfying the test are removed (instead of the leftmost)."</div>

<div><a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_sbs_s.htm">http://www.lispworks.com/documentation/HyperSpec/Body/f_sbs_s.htm</a></div><div><br></div><div>I am asking for feedback because I am rewriting all sequence functions to make them more efficient and way more readable.</div>

<div><br></div><div>Juanjo</div><div><br></div><div>(LET* ((ORIG #(1 2 3 4 5 6 7 8 9))</div><div>             (X (COPY-SEQ ORIG))</div><div>             (C 5)</div><div>             (RESULT</div><div>              (NSUBSTITUTE 'X</div>

<div>                           9</div><div>                           X</div><div>                           :TEST-NOT</div><div>                           #'(LAMBDA (A B) (INCF C -2) (/= (+ B C) A))</div><div>                           :FROM-END</div>

<div>                           T)))</div><div>        RESULT)</div><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://tream.dreamhosters.com">http://tream.dreamhosters.com</a><br>