vector

function/macrosince v0.0-927 clojure.core/vectorEdit
(vector & args)

Details:

Creates a new vector containing args.


See Also:


Source docstring:
Creates a new vector containing the args.
Function code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn vector
  [& args]
  (if (and (instance? IndexedSeq args) (zero? (.-i args)))
    (.fromArray PersistentVector (.-arr args) (not (array? (.-arr args))))
    (vec args)))

Macro code @ clojurescript:src/main/clojure/cljs/core.cljc
(core/defmacro vector
  ([] '(.-EMPTY cljs.core/PersistentVector))
  ([& xs]
   (core/let [cnt (count xs)]
     (if (core/< cnt 32)
       `(cljs.core/PersistentVector. nil ~cnt 5
          (.-EMPTY-NODE cljs.core/PersistentVector) (array ~@xs) nil)
       (vary-meta
         `(.fromArray cljs.core/PersistentVector (array ~@xs) true)
         assoc :tag 'cljs.core/PersistentVector)))))