Skip to content

clojure.core/conj

View this page on ClojureDocs

Type: function Added: Clojure 1.0 Examples: 11 Runnable: 9
([] [coll] [coll x] [coll x & xs])

conj[oin]. Returns a new collection with the xs 'added'. (conj nil item) returns (item). (conj coll) returns coll. (conj) returns []. The 'addition' may happen at different 'places' depending on the concrete type.

Examples

by MrHus on
by john.r.woodward on
by jamesqiu on
by Alan Thompson on . May have evaluation errors.
by fordsfords on . May have evaluation errors.
by bsima on
by yinwuzhe on
by edcaceres on
by phreed on
by berczeck on
by tomdl89 on

Note by me7

list prepend vector append

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.