Question - Projecting a collection onto a larger collection

Brent Pinkney pinkney_b at aircom.co.za
Fri Jun 20 12:31:31 UTC 2003


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