Collecting Smalltalk idioms

Allen Wirfs-Brock Allen_Wirfs-Brock at Instantiations.com
Tue Aug 10 15:16:25 UTC 1999


ANSI Smalltalk specifies the following:

5.7.1.14 Message:	do: operation separatedBy: separator

Synopsis

Evaluate operation with each element of the receiver interspersed by
evaluation of separator.

Definition: <collection>

For each element of the receiver, operation is evaluated with the element
as the parameter. Before evaluating operation the second and subsequent
times evaluate separator. Separator is not evaluated if there are less than
two elements nor after the last element.

Parameters

operation	<monadicValuable>	uncaptured
separator 	<niladicValuable>	uncaptured

Return Values
UNSPECIFIED

Errors
None





More information about the Squeak-dev mailing list