(conj)
(conj coll)
(conj coll x)
(conj coll x & xs)
conj[oin]. Returns a new collection with the xs
'added'. (conj nil item) returns (item). The 'addition' may
happen at different 'places' depending on the concrete type.
Example
Add a name to a vector
(conj ["Alice" "Bob"] "Charlie")
Add a key-val pair to a hash map
(conj {:name "Alice"} [:age 30])
Source
(defn
conj
"conj[oin]. Returns a new collection with the xs\n 'added'. (conj nil item) returns (item). The 'addition' may\n happen at different 'places' depending on the concrete type."
([] [])
([coll] coll)
([coll x] (if-not (nil? coll) (-conj coll x) (list x)))
([coll x & xs]
(if xs (recur (conj coll x) (first xs) (next xs)) (conj coll x))))