[squeak-dev] Future of Squeak, and outsider's view
Igor Stasenko
siguctua at gmail.com
Tue Jun 30 05:15:37 UTC 2009
Since multiple people seem don't grok my example, let me simplify it a bit:
Suppose you have a special collection of objects over which you can iterate.
The items in that collection could be anything - you don't really care
on almost any of them, except those ones which is also a special
collections of same kind as a container.
so, then you could have a method, which by iterating through your
special collection, ignores all objects except those who
also can be iterated in same manner:
MySpecialCollection>>mySpecialCollect: aBlock
^ self collect: [:each |
each isMySpecialCollection ifTrue: [ each mySpecialCollect:
aBlock] ifFalse: [each]
]
--
Best regards,
Igor Stasenko AKA sig.
More information about the Squeak-dev
mailing list
|