All Manuals > LispWorks User Guide and Reference Manual > 40 The LISPWORKS Package

NextPrevUpTopContentsIndex

with-action-list-mapping

Macro
Summary

Maps over an action list's actions with given variables bound to the executing action and its data.

Package

lispworks

Signature

with-action-list-mapping action-list item-var data-var &optional post-process &body body)

Arguments

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.

Description

The macro with-action-list-mapping maps over an action-list's action-items. During execution, 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 this function is invoked with the keyword argument :post-process :collect, a list the values returned by each action-item's setf operation are returned.

Examples
(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)))))
See also

execute-actions


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex