jan tolenaar / kiezellisp / index-of-everything

Name

acons

Usage

builtin-function

Syntax

(acons key value alist)

Description

Adds a key/value to an association list.

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

See also

assoc assoc-if pairlis