acons

Mit acons kann eine Assoziationsliste um einen Eintrag erweitert werden.

> (setq alist (quote ((eins 1 one) (zwei 2 two) (drei 3))))
((eins 1 one) (zwei 2 two) (drei 3))

> (acons (quote vier) 4 alist)
((vier 4) (eins 1 one) (zwei 2 two) (drei 3))


Die Funktion acons ist anhand von cons und list definiert:

(setq acons
  (lambda (key val plist)
    (cons
      (list key val)
      plist)))