[squeak-dev] #collect: on strings

John Thornborrow john at pinesoft.co.uk
Wed Jun 25 12:32:09 UTC 2008


Sorry, I misread your initial mail - I thought you wanted to 
collect/select only the vowels, not a collection of booleans!

However on that note, I agree with Cédrick, #collect: should answer the 
same species as it's receiver. :)

John

Damien Cassou wrote:
> On Wed, Jun 25, 2008 at 12:01 PM, John Thornborrow <john at pinesoft.co.uk> wrote:
>> It would be more natural to use #select: for this behaviour, as #collect: is
>> for the purpose of something like:
>>
>> 'a string' collect: [:each | each asUppercase]
> 
> I perfectly know the meaning of collect and I use it correctly,
> believe me. You could replace #isVowel by #asciiValue if storing
> booleans is a problem for you. The problem is the same.
> 
> 

-- 
John Thornborrow
http://www.pinesoft.co.uk


******************************************************************************************************************************************
This email is from Pinesoft Limited. Its contents are confidential to the intended recipient(s) at the email address(es) to which it has been addressed. It may not be disclosed to or used by anyone other than the addressee(s), nor may it be copied in anyway. If received in error, please contact the sender, then delete it from your system. Although this email and attachments are believed to be free of virus, or any other defect which might affect any computer or IT system into which they are received and opened, it is the responsibility of the recipient to ensure that they are virus free and no responsibility is accepted by Pinesoft for any loss or damage arising in any way from receipt or use thereof. *******************************************************************************************************************************************


Pinesoft Limited are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA



More information about the Squeak-dev mailing list