Next: , Previous: , Up: syslib vectors   [Index]


12.16.4 Mapping over vectors

The arguments vec to these operations must be fixnums, the arguments fx must be fixnums. The following bindings are exported by the library (vicare system $vectors).

Unsafe Operation: $vector-map1 func vec

Like vector-map, but for only one vector argument: build and return a new vector having the same size of vec and items equal to the result of applying func to the items of vec.

Unsafe Operation: $vector-for-each1 func vec

Like vector-for-each, but for only one vector argument: apply func to all the items of vec and discard the return values.

Unsafe Operation: $vector-for-all1 func vec

Like vector-for-all, but for only one vector argument: return true if func returns true for all the items in vec. If the application of func to the items of vec returns true up to the penultimate item, the last application is performed as tail call.

Unsafe Operation: $vector-for-exists1 func vec

Like vector-exists, but for only one vector argument: return #f if func returns #f for all the items in vec. If the application of func to the items of vec returns #f up to the penultimate item, the last application is performed as tail call.