Lazy length computation in DEFINE-SEQUENCE-TRAVERSER
DEFINE-SEQUENCE-TRAVERSER used to unconditionally establish a binding
of LENGTH{,1,2} to the length of the processed sequence(s). This was
wasteful in the case of user-defined sequences whos implementations
could not access this information.
DEFINE-SEQUENCE-TRAVERSER now uses SYMBOL-MACROLET to provide LENGTH{,1,2}
symbols which evaluate to the respective sequence lengths, but the
sequence length is only computed when needed.
Uses of DEFINE-SEQUENCE-TRAVERSER now have to avoid forcing
LENGTH{,1,2} and thus END{,1,2} handling only appears in the list- and
vector-code-paths. The affected sequence functions are REDUCE,
DELETE[-IF[-NOT]], REMOVE[-IF[-NOT]], REMOVE-DUPLICATES,
DELETE-DUPLICATES, SUBSTITUTE[-IF[-NOT]], NSUBSTITUE[-IF[-NOT]],
COUNT[-IF[-NOT]], MISMATCH and SEARCH.