March 1, 2011
10:26 a.m.
Comment #3 on issue 3761 by gazzagu...@googlemail.com: overlappingPairsCollect: fails on OrderedCollections http://code.google.com/p/pharo/issues/detail?id=3761 Except that it would then fail if the receiver was an Array, for instance. The following should work though: overlappingPairsCollect: aBlock "Answer the result of evaluating aBlock with all of the overlapping pairs of my elements." | retval | retval := self species ofSize: self size - 1. 1 to: self size - 1 do: [:i | retval at: i put: (aBlock value: (self at: i) value: (self at: i + 1)) ]. ^retval