Maps over an action list's actions with given variables bound to the executing action and its data.
lispworks
with-action-list-mapping (action-list item-var data-var &optional post-process) &body body
action-list⇩ |
An action list. |
item-var⇩ |
A Lisp symbol. |
data-var⇩ |
A Lisp symbol. |
post-process⇩ |
A keyword. |
body⇩ |
A body of Lisp code. |
The macro with-action-list-mapping
evaluates body for every action-item of action-list. During evaluation of body, the symbols specified for item-var and data-var are bound to the executing action-item and its data respectively. See execute-actions for more on post-processing.
If post-process is :collect
, then a list the values returned by each action-item's setf operation are returned.
(defun my-execution-function (the-action-list other-args &key (post-process nil) &allow-other-keys) (declare (ignore other-args)) (with-action-list-mapping (the-action-list an-action-item action-item-data post-process) (do-something-interesting-first) (setf (symbol-value (car action-item-data)) (apply (cadr action-item-data) (cddr action-item-data)))))
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:41