[squeak-dev] Re: #collect: on strings

Klaus D. Witzel klaus.witzel at cobss.com
Wed Jun 25 14:43:56 UTC 2008


On Wed, 25 Jun 2008 10:46:49 +0200, Damien Cassou wrote:

> On Wed, Jun 25, 2008 at 9:39 AM, cdrick wrote:
>> (Array withAll: 'something') collect: [ :letter | letter isVowel ].
>> #(false true false true false false true false false)
>
> I did that
>
> 'something' asArray collect: [ :letter | letter isVowel ].
>
> do get the desired behavior. However, it is not intuitive to me.

I agree, in some cases I want to tell #collect: what #species to use (OT:  
and inspired by the LambdaMessageSend package, I have made a snippet which  
does feed #species into otherwise unchanged #collect:).

But what do *you* expect to happen with your original expression, mind to  
share?

>





More information about the Squeak-dev mailing list