[ANSI-Smalltalk] Behaviour of #collect:
Paolo Bonzini
bonzini at gnu.org
Mon Sep 22 18:10:53 BST 2008
Eliot Miranda wrote:
> what about
> Collection class collect: aBlock from: aCollection
> e.g.
> Array collect: [:each | each codePoint] from: 'abc'
I don't like very much having non-block methods before the last argument...
I preferred Richard's selector, which I guess is based on the idea that
it is like
Array withAll: ('abc' collect: [:each | each codePoint])
except that it works. :-)
Paolo
> > My own library has in each collection class a class method
> > SomeCollection withAll: aCollection collect: aBlock
More information about the ANSI-Smalltalk
mailing list