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

Damien Cassou damien.cassou at gmail.com
Wed Jun 25 14:48:17 UTC 2008


On Wed, Jun 25, 2008 at 4:43 PM, Klaus D. Witzel <klaus.witzel at cobss.com> wrote:
> 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?

A collection of boleans.


-- 
Damien Cassou
Peter von der Ahé: «I'm beginning to see why Gilad wished us good
luck». (http://blogs.sun.com/ahe/entry/override_snafu)



More information about the Squeak-dev mailing list