[Newbies] Block and Closure

Randal L. Schwartz merlyn at stonehenge.com
Fri Apr 10 03:48:29 UTC 2009

>>>>> "K" == K K Subramaniam <subbukk at gmail.com> writes:

K> In Squeak, i in the block will refer to the i in the do: block and the last 
K> statement will print 25 because i would be 5 when do: terminates.

Not necessarily. I could see an implementation where i would be 4.

Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

More information about the Beginners mailing list