Function: map-insert
map-insert is a byte-compiled function defined in map.el.gz.
Signature
(map-insert MAP KEY VALUE)
Documentation
Return a new map like MAP except that it associates KEY with VALUE.
This does not modify MAP.
If you want to insert an element in place, use map-put!.
The default implementation defaults to map-copy and map-put!.
Probably introduced at or before Emacs version 27.1.
Implementations
(map-insert (MAP list) KEY VALUE) in `map.el'.
Cons KEY and VALUE to the front of MAP.
(map-insert MAP KEY VALUE) in `map.el'.
Undocumented
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/map.el.gz
(cl-defgeneric map-insert (map key value)
"Return a new map like MAP except that it associates KEY with VALUE.
This does not modify MAP.
If you want to insert an element in place, use `map-put!'.
The default implementation defaults to `map-copy' and `map-put!'."
(let ((copy (map-copy map)))
(map-put! copy key value)
copy))