HP Integrity NonStop J-Series User Manual
Page 149

The items are appended at the tail of the list. For each item, the apply() function calls the
user-defined function printAFoo() with the address of the item as the first argument, and the
address of an ostream (an output stream) as the second argument. The job of printAFoo() is to
print out the value of member data val. Because apply() scans the list from beginning to end, the
items will come out in the same order in which they were inserted. See the Class Reference for
RWGDlist(type).
With some care, you can use apply functions to change the objects in a collection. For example,
you could change the value of member data val in the example above, or delete all member
objects. In the latter case, however, you must be careful not to use the collection again.