Liking cljdoc? Tell your friends :D

telsos.lib.algorithms.vecs


dovecclj/s

(dovec v body)

v=clj/s

(v= v)
(v= v1 v2)
(v= v1 v2 & more)

vassocclj/s

(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]
raw docstring

vcountclj/s

(vcount v)

vec-every?clj/s

(vec-every? pred v)

vempty?clj/s

(vempty? v)

vfirstclj/s

(vfirst v)

vlastclj/s

(vlast v)

vnthclj/s

(vnth v index)

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close