[squeak-dev] Clean Block Closures question

Jaromir Matas mail at jaromir.net
Tue Feb 14 18:20:29 UTC 2023

Hi Eliot, all,

What happens if we send an unclean block to a clean block as an argument?

I guess the answer is: nothing, it doesn't affect the definition of being a clean block; the blocks have independent static chains (outer/home) (I just want to be sure).

[:aBlock | aBlock value] isClean " --> true "

[:aBlock | aBlock value] value: [^2] " --> this will return from inside a clean block "

A more complicated example; define:

cleanExample: aBlock
                [:block | block value] value: aBlock.

And then run:
self cleanExample: [^2] " --> this will return from inside a clean block inside a method "



Jaromír Matas

mail at jaromir.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230214/1f336f89/attachment.html>

More information about the Squeak-dev mailing list