do-instances [Macro]


Purpose

The do-instances macro executes a body of Lisp code once for each instance in each knowledge base of a Loom network.

Syntax

do-instances variable &body body

Arguments

The variable argument is a list containing a single iteration variable.

The body argument is the Lisp code to be executed for each binding of the iteration variable.

Value

This function returns nil.

Remarks

This function iterates over all instances, including concepts and relations.

Examples

(do-instances (x) 
    (foo x) 
    (unless (meta-concept-p x) (bar x)))

See Also

Last modified: Jun 1 1995