[squeak-dev] Re: #collect: on strings
Klaus D. Witzel
klaus.witzel at cobss.com
Thu Jun 26 08:39:22 UTC 2008
On Thu, 26 Jun 2008 09:23:57 +0200, Bert wrote:
> Am 26.06.2008 um 08:11 schrieb Klaus D. Witzel:
>> And by code duplication, #collect:into: could do the job ;)
>
> If you indeed need this, I'd propose as:collect:.
That's even better :) Example on Damien's:
'something' as: Array collect: [ :letter | letter isVowel ]
And it can be less "confusing" than my lambda meta programming:
'something' <+ #species +> Array collect: [ :letter | letter isVowel ]
"when #species is sent by #collect: answer Array"
though my intention with #<+,#+> is to avoid code duplication ;)
> - Bert -
>
More information about the Squeak-dev
mailing list
|