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

Jaromir Matas m at jaromir.net
Thu Mar 11 07:33:38 UTC 2021


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


More information about the Squeak-dev mailing list