/usr/lib/s9fes/help/vector-map is in scheme9 2010.11.13-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | S9 LIB (vector-map procedure vector ...) ==> vector
(vector-map! procedure vector ...) ==> unspecific
(load-from-library "vector-map.scm")
Map a procedure over a set of vectors, giving a new vector
(vector (f (vector-ref v0 i) ... ) ...)
where F is the given PROCEDURE, V0 is the first and VN is the last
VECTOR specified. The arity of PROCEDURE must match the number of
vectors passed to these procedures. VECTOR-MAP is to vectors what
MAP is to lists.
VECTOR-MAP! does not create a fresh vector, but changes the members
of the *first* vector in situ.
(let ((v (vector 1 2 3)))
(vector-map! - v)
v) ==> #(-1 -2 -3)
(vector-map + '#(1 2 3) '#(4 5 6)) ==> #(5 7 9)
|