perform [Macro]


The perform macro is used to create tasks. A task is the application of a specific Loom action (implemented as a set of methods) to one or more objects. The perform macro executes the task immediately, rather than queuing it for later execution (as schedule does).


perform (actionName &rest arguments) &key returnOption


The actionName argument is the name of the action which is to be applied to arguments. The procedure actually performed depends on which of the methods attached to actionName have their situation patterns satisfied by arguments.

The arguments argument contains zero or more variables or constants. Keyword arguments are supported, but optional and rest arguments are not.

The returnOption argument specifies what kind of value the action should return. The options are:

If returnOption is not supplied, it defaults to :value.


The return value of perform is determined by the returnOption argument (see above).


Tasks may be performed as a result of production firings, as well as explicit calls to perform.


(perform (weigh-box box)) ==> 44 
(perform (inspect-box box shipper) :return :success-p) ==> T 
(perform (notify-shipper (fi Acme)) :return :task) ==> 

See Also

Last modified: Jun 1 1995