Function: parseclj-alist-assoc
parseclj-alist-assoc is a byte-compiled function defined in
parseclj-alist.el.
Signature
(parseclj-alist-assoc COLL K V)
Documentation
Associate a key K with a value V in the association list COLL.
Returns a new alist (does not mutate its argument). If an entry with the same key is present it will be replaced, otherwise the new kv-pair is added to the head of the list.
Source Code
;; Defined in ~/.emacs.d/elpa/parseclj-20261002.1230/parseclj-alist.el
(defun parseclj-alist-assoc (coll k v)
"Associate a key K with a value V in the association list COLL.
Returns a new alist (does not mutate its argument). If an entry
with the same key is present it will be replaced, otherwise the
new kv-pair is added to the head of the list."
(if (map-contains-key coll k)
(mapcar (lambda (entry)
(if (equal (car entry) k)
(cons k v)
entry))
coll)
(cons (cons k v) coll)))