chickadee » srfi-133 » vector-count

vector-count pred? vec1 vec2 ...procedure

Counts the number of parallel elements in the vectors that satisfy pred?, which is applied, for each index i in the range [0, length) where length is the length of the smallest vector argument, to each parallel element in the vectors, in order.

Examples:

(vector-count even? '#(3 1 4 1 5 9 2 5 6))
 ;=> 3

(vector-count < '#(1 3 6 9) '#(2 4 6 8 10 12))
 ;=> 2