Name

acons

Usage

builtin-function

Syntax

(acons key value alist)

Description

Adds a key/value to an association list.

user > (def seq (acons 'a 1 null))
it: seq
user > seq
it: ((a 1))
user > (setf seq (acons 'b 2 seq))
it: ((b 2) (a 1))
user > (assoc 'a seq)
it: (a 1)
user > (assoc 'b seq)
it: (b 2)
user > (assoc 'c seq)
it: null

See also

assoc assoc-if pairlis