![]() | ![]() | ![]() | do-sorted-instances-of-class | ![]() |
| (var
| [Macro] |
Purpose
Iterate over each unit instance of the specified
unit classes, in sorted order.
Package :gbbopen
Module :gbbopen-core
Arguments and values
var | A variable symbol | |
unit-classes-specifier | An extended unit-classes specification (see below) | |
predicate | A function designator specifying a function object of two arguments that returns a generalized boolean | |
key | A function designator specifying a function object
of one argument, or nil (default is nil )
| |
declaration | A declare expression (not evaluated) | |
tag | A go tag (not evaluated)
| |
form | A form |
Detailed syntax
| t |
single-unit-class-specifier
| ( single-unit-class-specifier+) |
| atomic-unit-class |
( atomic-unit-class subclassing-specifier) |
| unit-class | unit-class-name |
| :plus-subclasses | :no-subclasses |
+ | = |
The shorthand +
subclasses specifier is equivalent to
:plus-subclasses
and =
to :no-subclasses
.
Description
The iteration is performed once for each unit instance
of the specified unit classes, whether or not the instances reside on
any space instances.
See also
do-instances-of-class
find-instances-of-class
make-instances-of-class-vector
map-instances-of-class
map-instances-on-space-instances
map-sorted-instances-of-class
Example
Print a list of all hyp
instance names, in ascending order:
(do-sorted-instances-of-class (instance 'hyp #'< :key #'instance-name-of) (print (instance-name-of instance)))
The GBBopen Project
![]() | ![]() | ![]() | do-sorted-instances-of-class | ![]() |