Difference between revision 1 and current revision
Summary: CVS:(\w*?).el -> GIT:$1.el
< * CVS:apel/alist.el
> * GIT:a.el/alist.el
The ElispManual does a stand-up job of introducing some of the primitive functions for operating with association lists. More significant tasks can be accomplished with the
‘alist’ library that comes with APEL.
To use the library in your code you must require it with:
To change or add a key-value pair, use
(setq test-alist '((a . 0) (b . 1))) ==> ((a . 0) (b . 1)) (set-alist 'test-alist 'a 9) ==> ((a . 9) (b . 1)) (set-alist 'test-alist 'c 3) ==> ((c . 3) (a . 9) (b . 1))
To delete a key-value pair, use
(remove-alist 'test-alist 'a) ==> ((c . 3) (b . 1))
See also AlistVsPlist.