BlockClosures, . , , , . ( ), , [nil] .
, , , . , [nil] , [nil] (, defaultRunBlock) RunBlock ( ) , , toRunBlock .
Object subclass:
instanceVariableNames: 'toRunBlock defaultRunBlock'
"or as class variable:"
classVariableNames: 'DefaultRunBlock'
poolDictionaries: ''
category: 'Kernel-Methods'
initialize
defaultRunBlock := [nil]
otherCode
toRunBlock := defaultRunBlock
whereYouCompareThem
toRunBlock == defaultRunBlock ifTrue: [ "..." ]
, toRunBlock , .
whereYouCompareThem
toRunBlock == previousRunBlock ifTrue: [ "..." ].
previousRunBlock := toRunBlock