Next: , Previous: DOCONS, Up: DOLIST-like Macros


3.3.3 doalist and doalist*

— Macro: doalist (key value alist &optional result) &body body

This is analogous to dolist, but for “cdr-valued” alists. The difference is that an alist is expected and two variable names are required: one for the key and another for the value.

Throws an error if one of the items in the list is not a list (cons or nil). If an entry is nil, then both key and value will be nil, to reflect the behavior of car and cdr with a nil argument (or should this throw an error?).

The usual conventions are respected:

— Macro: doalist* (key value alist &optional result) &body body

Analogous to the non-starred version above, but for “cadr-valued” alists.