(dovec v body)(v= v)(v= v1 v2)(v= v1 v2 & more)(vassoc v index value)(vassoc v index value default)Like assoc but extends vector with default values if index is beyond current size.
Usage: (vassoc v index value) ; extends with nil (vassoc v index value default) ; extends with default value
Examples: (vassoc [] 0 4) ; => [4] (vassoc [] 1 4) ; => [nil 4] (vassoc [] 3 4 :x) ; => [:x :x :x 4]
Like assoc but extends vector with default values if index is beyond current size. Usage: (vassoc v index value) ; extends with nil (vassoc v index value default) ; extends with default value Examples: (vassoc [] 0 4) ; => [4] (vassoc [] 1 4) ; => [nil 4] (vassoc [] 3 4 :x) ; => [:x :x :x 4]
(vcount v)(vec-every? pred v)(vempty? v)(vfirst v)(vlast v)(vnth v index)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |