[Cuis-dev] Some more Bag tweaks

Luciano Notarfrancesco luchiano at gmail.com
Tue May 3 00:54:15 PDT 2022


Here are some more methods that take advantage of the structure of a Bag
(#allSatisfy:, #anySatisfy:, #max:, #min:, #sum:, etc).

Also made some tweaks to some methods in Collection to call existing
methods instead of reimplementing, in order to simplify the changes in Bag
(otherwise. for example, I'd have to implement #sum, #sum: and
#sum:ifEmpty: in Bag instead of only implementing #sum:ifEmpty). And I
changed Collection>>#product to produce an error when the collection is
empty instead of returning 1 (to be consistent with Collection>>#sum:).

All base image tests pass, but please review.

Also, while running tests I got a walkback on BitBltCanvasEngine, see the
attached log.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220503/2bba67ae/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5132-BagAndCollectionTweaks-LucianoEstebanNotarfrancesco-2022May03-06h51m-len.001.cs.st
Type: application/octet-stream
Size: 4254 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220503/2bba67ae/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CuisDebug-2022-05-03_07.18.26.log
Type: text/x-log
Size: 40076 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220503/2bba67ae/attachment-0001.bin>


More information about the Cuis-dev mailing list