Collecting Smalltalk idioms
Stephen Pope
stp at create.ucsb.edu
Tue Aug 10 14:54:47 UTC 1999
Andrew C. Greenberg wrote:
>
> Of course, I can bury any ugliness, if necessary, just by adding a
> #do:inbetween: method or the like to the Collection protocol.
This is how it was done in the old PARC research image; do:andBetweenDo:
is useful for many things.
Another option is the ugly (but simple)
aCollection do:
[:each |
each printOn: aStream.
aStream nextPut: $,].
aStream skip: -1
stp
--
Stephen Travis Pope -- http://www.create.ucsb.edu/~stp
stp at create.ucsb.edu -- stp9 at cornell.edu
More information about the Squeak-dev
mailing list
|