Next: , Previous: , Up: Number   [Index]


1.122.12 Number: shortcuts and iterators

to: stop

Return an interval going from the receiver to stop by 1

to: stop by: step

Return an interval going from the receiver to stop with the given step

to: stop by: step collect: aBlock

Evaluate aBlock for each value in the interval going from the receiver to stop with the given step. The results are collected in an Array and returned.

to: stop by: step do: aBlock

Evaluate aBlock for each value in the interval going from the receiver to stop with the given step. Compiled in-line for integer literal steps, and for one-argument aBlocks without temporaries, and therefore not overridable.

to: stop collect: aBlock

Evaluate aBlock for each value in the interval going from the receiver to stop by 1. The results are collected in an Array and returned.

to: stop do: aBlock

Evaluate aBlock for each value in the interval going from the receiver to stop by 1. Compiled in-line for one-argument aBlocks without temporaries, and therefore not overridable.