-
Notifications
You must be signed in to change notification settings - Fork 86
vector map
Matthias Görges edited this page Jul 19, 2014
·
1 revision
vector-map is the vector-equivalent function of map for lists
Parameter | Description |
---|---|
fcn | Function applied to vector(s) |
vec | Vector operated on |
vectors | Optional: Additional vectors operated on |
Example 1: Show comparison of map and vector-map for lists and vectors respectively.
> (map sqrt (list 1 4 16))
(1 2 4)
> (vector-map sqrt (vector 1 4 16))
#(1 2 4)
> (map + (list 1 2 3 4 5) (list 9 8 7 6 5))
(10 10 10 10 10)
> (vector-map / (vector 2 3 4) (vector 1 2 3))
#(2 3/2 4/3)
> (vector-map (lambda (l) (+ l 2)) (vector 0 1 2 3 4))
#(2 3 4 5 6)
-
- accelerometer
- alist
- audio
- audioaux
- base64
- btle-scan
- camera
- cdb
- cgi
- config
- csv
- curl
- digest
- dmtx
- download
- eventloop
- fcgi
- fft
- generalized-arrays
- gps
- graph
- gyro
- hidapi
- hpdf
- html
- httpsclient
- hybridapp
- json
- lmdb
- ln_core
- ln_glcore
- ln_glgui
- ln_store
- localization
- localization_gui
- localnotification
- magnetometer
- mdns
- mqtt
- mqtt-store
- multitouch
- oauth
- orientation
- p256ecdsa
- png
- portaudio
- pregexp
- pressure
- prime
- pushnotification
- redcap
- rsa
- rtaudio
- rupi
- rotation
- sanestring
- scheduler
- serial
- sets
- settings
- simplexnoise
- sqlite
- ssax
- syntax-case
- timestamp
- ttf
- uiform
- url
- uuid
- vibrate
- videoplayer
- watchdog
- website
- xml
- zip