j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Sequenceable collection with: do: had a bug in that it would fail work with uneven size collections. This bug has been fixed, but the same bug applies to >>with: collect: The fix is the same, and is included below:
SequenceableCollection>>
with: otherCollection collect: twoArgBlock "Collect and return the result of evaluating twoArgBlock with corresponding elements from this collection and otherCollection." | result | otherCollection size = self size ifFalse: [self error: 'otherCollection must be the same size']. result _ self species new: self size. 1 to: self size do: [:index | result at: index put: (twoArgBlock value: (self at: index) value: (otherCollection at: index))]. ^ result
squeak-dev@lists.squeakfoundation.org