> We have other selectors available for RunArray specific semantic, like aRunArray values do:, aRunArray runsAndValuesDo:
Am Do., 2. Jan. 2020 um 21:12 Uhr schrieb Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>:If we strictly adhere to this interpretation of method comment, detectMin: detectMax: detect:ifNone: and count: should also iterate on each and every element.Do you agree that count: hardly benefits from such definition?
Instinctively I wanted to reply that the optimization in RunArray does not change the result of these operations contrary to collect: because they do not change elements, so equal elements could not suddenly become non-equal elements during the operation. But it got me thinking that I cannot imagine these usefully with side effects in the blocks... :-)
What about do: and inject:into: instead? Would you evaluate their blocks only once per run?