Next Prev Up Top Contents Index

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 with-action-list-mapping macro 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 Reference Manual - 13 Jun 2003

Next Prev Up Top Contents Index