[ANSI-Smalltalk] Behaviour of #collect:

Paolo Bonzini bonzini at gnu.org
Thu Sep 25 10:55:45 BST 2008


Andres Valloud wrote:
> Or this?...
> 
> 'abc' collect: [:x | x codePoint] into: Array

But this cannot be implemented except as a call to

  Array collect: ... from: ...

(or whatever the selector), because it's the new collection's class that
knows how to create the new collection.

Paolo



More information about the ANSI-Smalltalk mailing list