OCLOperators foreach
From MDrivenWiki
Note: This is an EAL operator
Iterates a collection containing and executing the expression on all elements contained in self.
Expression | Result |
---|---|
(list of objects)->forEach(str | str.DoSomething) | The method DoSomething is called once on each of the objects in (list of objects) |
To iterate and return a list as the result, use collect.