Name

conj

Usage

builtin-function

Syntax

(conj seq &rest items)

Description

Adds each item to the begin or end of seq which must be a list or a vector.

user > (def a (list 1 2 3))
it: a
user > a
it: (1 2 3)
user > (conj a 4)
it: (4 1 2 3)
user > a
it: (1 2 3)

user > (def a (vector 1 2 3))
it: a
user > a
it: #v(1 2 3)
user > (conj a 4 5)
it: #v(1 2 3 4 5)
user > a
it: #v(1 2 3 4 5)