Question - Projecting a collection onto a larger collection
Daniel Vainsencher
danielv at netvision.net.il
Fri Jun 20 14:02:25 UTC 2003
I think the methods #gather:* are bundled with Avi Bryant's PackageInfo.
Daniel
Brent Pinkney <pinkney_b at aircom.co.za> wrote:
> Hi,
>
> What is the preffered method of porjecting on collection onto a larger collection ?
>
> collect:, select: and reject only map a collection onto a smaller collection.
>
> e.g. I want to map {Date. Time } to { Date. Date class. Time. Time class }
>
> I dimly remember seeing some mention of a project: method
>
> I am looking for Something of the flavour:
>
> {Date. Time } project: [ :nc :e | nc add: e; add: e class ].
>
> nc is an appropriate collection.
>
> I know I can achieve this in multiple lines of code - is there a preferred method ?
>
> Thanks
>
> Brent
More information about the Squeak-dev
mailing list
|