"<i>predicate</i>, <i>test</i>, and <i>test-not</i> might be called more
than once for each <a rel="DEFINITION" href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_s.htm#sequence"><i>sequence</i></a>
<a rel="DEFINITION" href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_e.htm#element"><i>element</i></a>,
and their side effects can happen in any order."<br><br>The implementation is free to choose any inspection order under all conditions.<br><br>:from-end and :count are not significant for ordering -- they just specify a subset for inspection.<br>
<br><div class="gmail_quote">On Fri, May 21, 2010 at 6:00 AM, Juan Jose Garcia-Ripoll <span dir="ltr"><<a href="mailto:juanjose.garciaripoll@googlemail.com">juanjose.garciaripoll@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><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" target="_blank">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><font color="#888888">-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://tream.dreamhosters.com" target="_blank">http://tream.dreamhosters.com</a><br>
</font><br>------------------------------------------------------------------------------<br>
<br>
<br>_______________________________________________<br>
Ecls-list mailing list<br>
<a href="mailto:Ecls-list@lists.sourceforge.net">Ecls-list@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/ecls-list" target="_blank">https://lists.sourceforge.net/lists/listinfo/ecls-list</a><br>
<br></blockquote></div><br>