chickadee » data-structures » alist-update

alist-update KEY VALUE ALIST #!optional TESTprocedure
alist-update! KEY VALUE ALIST #!optional TESTprocedure

If the list ALIST contains a pair of the form (KEY . X), then this procedure replaces X with VALUE and returns ALIST. If ALIST contains no such item, then alist-update returns ((KEY . VALUE) . ALIST). The optional argument TEST specifies the comparison procedure to search a matching pair in ALIST and defaults to eqv?. alist-update! is the destructive version of alist-update.