FOR provides inclusion in a set based on Individual Property.
FOR '(' setexpression1 ',' setexpression2 ')'
There are occasions when the global nature of set selection, where each set is selected
on a global basis and the union or intersection of these sets is used to produce the
overall selection, is not appropriate because one wishes to examine the simultaneous
properties of an individual variable to determine whether it should be included in the
set. Examination of individual properties is expensive in comparison to the creation of a
global set, so the FOR() function should only be used when there is no other choice.
In operation, each member of setexpression1 is placed where the NODE operator will find
it, and setexpression2 is evaluated. If the set resulting from setexpression2 is not null,
the members of setexpression2 are added to the output set.
To ensure efficiency, setexpression1 should be as restrictive as possible.
FOR( Members Weight,FND((Attributes NODE), > 5))
The FOR() function cycles through all variables which meet the Members of Weight
requirement, setting node to each variable in turn, then interprets the FND function.
The FND function takes the current value of node, finds the
set of attributes of node, and if the size of that set is greater than 5, returns the set,
otherwise returns the null set. The set returned by FND is included in the output set.