Daniel Colascione wrote: > I ... dislike count-leading as a name: it suggests that the function > is useful only at the beginning of a vector. How about count-consecutive? Sounds good. Revised patch attached. > bool-vector-count-matches is supposed to be evocative to CL's > count-matches, which has a similar interface. I can't find 'count-matches' in the online documentation for CL, here: http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node145.html It appears that (bool-vector-count-population A) would correspond to Common Lisp's (count t A), and that (bool-vector-count-consecutive A B I) would correspond to Common Lisp's (- (or (position (not B) A :start I) (length A)) I). If so, Common Lisp's API is so far from the latter primitive that its names don't seem to provide much guidance. It might make sense to rename the former primitive's name to bool-vector-count-t, if you'd prefer that. (P.S. I don't use CL much, so if I'm missing out on some commonly-used CL library somewhere, please bear with me.)