vector-of

added
1.2

ns
clojure.core

type
function

(vector-of t) (vector-of t & elements)

Creates a new vector of a single primitive type t, where t is one
of :int :long :float :double :byte :short :char or :boolean. The
resulting vector complies with the interface of vectors in general,
but stores the values unboxed internally.

Optionally takes one or more elements to populate the vector.

                user=> (conj (vector-of :int) 1 2 3)
[1 2 3]  ; <-- note, these are unboxed internally

user=> (vector-of :int 1 2 3)
[1 2 3]  ; same here

user=> (type (conj (vector-of :int) 1 2 3))
clojure.core.Vec