Next: SRFI-43 Searching, Previous: SRFI-43 Selectors, Up: SRFI-43 [Contents][Index]
The fundamental vector iterator. kons is iterated over each index in all of the vectors, stopping at the end of the shortest; kons is applied as
(kons i state (vector-ref vec1 i) (vector-ref vec2 i) ...)
where state is the current state value, and i is the current index. The current state value begins with knil, and becomes whatever kons returned at the respective iteration. The iteration is strictly left-to-right.
Similar to vector-fold
, but it iterates right-to-left instead of
left-to-right.
Return a new vector of the shortest size of the vector arguments. Each element at index i of the new vector is mapped from the old vectors by
(f i (vector-ref vec1 i) (vector-ref vec2 i) ...)
The dynamic order of application of f is unspecified.
Similar to vector-map
, but rather than mapping the new elements
into a new vector, the new mapped elements are destructively inserted
into vec1. The dynamic order of application of f is
unspecified.
Call (f i (vector-ref vec1 i) (vector-ref vec2 i) ...)
for each
index i less than the length of the shortest vector passed. The
iteration is strictly left-to-right.
Count the number of parallel elements in the vectors that satisfy pred?, which is applied, for each index i less than the length of the smallest vector, to i and each parallel element in the vectors at that index, in order.
(vector-count (lambda (i elt) (even? elt)) '#(3 1 4 1 5 9 2 5 6)) ⇒ 3 (vector-count (lambda (i x y) (< x y)) '#(1 3 6 9) '#(2 4 6 8 10 12)) ⇒ 2
Next: SRFI-43 Searching, Previous: SRFI-43 Selectors, Up: SRFI-43 [Contents][Index]