do(
aCollection, aFunction(
number, number)
)
;
aCollection.do(
aFunction(
number, number)
)
;
aFunction
to be executed once for each element in aCollection, which can be any kind of Collection. Each time aFunction
is run, it is given two arguments, in this order: an element of aCollection, and the elements index number. For Collection's that don't have index numbers, it returns what the element's index number would have been. The loop always begins at the start of the Collection, and progresses with each element in order to the end. The second argument, really, is the integers from zero to one less than the number of elements in the Collection, increasing by one each time the loop executes aFunction
.