chickadee » srfi-133 » vector-for-each

vector-for-each f vec1 vec2 ...procedure

[R7RS-small] Simple vector iterator: applies f to the corresponding list of parallel elements from vec1 vec2 ... in the range [0, length), where length is the length of the smallest vector argument passed, In contrast with vector-map, f is reliably applied to each subsequent element, starting at index 0, in the vectors.


(vector-for-each (lambda (x) (display x) (newline))
                 '#("foo" "bar" "baz" "quux" "zot"))


foo bar baz quux zot