[ANSI-Smalltalk] Behaviour of #collect:

Eliot Miranda eliot.miranda at gmail.com
Tue Sep 23 17:37:18 BST 2008


Sorry.  I meant to suggest collect:from: as an alternative spelling of
withAll:collect:.  I find collect:from: more intention-revealing than
withAll:collect:.

On Mon, Sep 22, 2008 at 8:40 PM, Richard A. O'Keefe <ok at cs.otago.ac.nz>wrote:

>
> On 23 Sep 2008, at 4:40 am, Eliot Miranda wrote:
>
>  what about
>>     Collection class collect: aBlock from: aCollection
>> e.g.
>>     Array collect: [:each | each codePoint] from: 'abc'
>> ?
>>
>>  Because there isn't any #collect:from: in the Smalltalks
> I use.  I've already mentioned the operation I added,
> which is named consistently with the ANSI methods, namely
>        <class> withAll: collection collect: aBlock
> This also goes with
>        <collection> addAll: collection collect: aBlock
>
> #withAll:collect: is nice, and I'd like to see it in the
> new standard, but it's long winded and it's limiting.
>
>
>
>
> _______________________________________________
> ANSI-Smalltalk mailing list
> ANSI-Smalltalk at lists.openskills.org
> http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openskills.org/pipermail/ansi-smalltalk/attachments/20080923/337e732d/attachment.htm


More information about the ANSI-Smalltalk mailing list