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

Jaromir Matas m at jaromir.net
Thu Mar 11 10:38:47 UTC 2021


> Reminds me of the difference between "while...do" and "do...until" loops.
> :-)

True, I never know and always have to doublecheck :)

Ok, I'll change the wording:

aCaseOfBeers
    collect: [:each | self drink: each] 
    selecting: #lager 
    stopBefore: #isMidnight

assuming `self drink` returns the empty bottle ;)



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


More information about the Squeak-dev mailing list