[squeak-dev] Collections/Streams | About enumerating a sequence up to a matching query ...

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Thu Mar 11 09:48:05 UTC 2021


-1 :-)


For the same reason why I argued against #do:upThrough: - the order of arguments would be confusing. We would first check to stop, and then do any collect/select operations.


Best,

Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Jaromir Matas <m at jaromir.net>
Gesendet: Donnerstag, 11. März 2021 08:33:38
An: squeak-dev at lists.squeakfoundation.org
Betreff: Re: [squeak-dev] Collections/Streams | About enumerating a sequence up to a matching query ...

To add my 2¢; how about, in the spirit of the pidgin English tradition:

        aCollection
                collect: [:x | x squared]
                selecting: #even
                stopIf: [:x | x squared = 2500]

complemented by:

        aCollection
                collect: [:x | x squared]
                selecting: #even
                stopBefore: #isNil



-----
^[^ Jaromir
--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210311/11edc409/attachment.html>


More information about the Squeak-dev mailing list