FunctionAddAssoc
(
alist A,
list keyval
)
->
alist
Optional Arguments
Fail | any | | Determines what to return in case of failure. | Success | any |
(Default:
SUCCESS)
| Determines what to return in case of success. |
Description
Associate `key' (taken as first element of `keyval') with `val' (taken as the rest of `keyval') in alist `A' if `key' was not already present and return the alist derived from this association or FAILURE in case `key' already had an association in `A'.
Note: This does not affect `A'.
Examples
A:=Alist();
AddAssoc(A,[2,"bar","and_baz"]);
|