Yes
use #removeAllSuchThat: aBlock
Like most Smalltalk collection methods, it returns something useful. In this case, it removes all objects for which aBlock is true; it also returns a collection of what was removed
======================
|colToGo |
colToGo := coll removeAllSuchThat: [: each | each stays not]
======================
This is present in VisualWorks; I haven't checked other implemtations. If not available on your platform, I can post the code for the method
Take care,
Jay O'Connor
"Going places unmapped
to do things unplanned
to people unsuspecting"