Am 03.10.2008 um 09:27 schrieb Randal L. Schwartz:
"Nicolas" == Nicolas Cellier <[EMAIL PROTECTED]> writes:
Nicolas> For the fun of it, see also
Nicolas>
http://article.gmane.org/gmane.comp.lang.smalltalk.gnu.general/3375/match=break
Oww. I remember that. It makes my head hurt.
You could even go further:
Object >> valuedEscaper: aBlock
^ aBlock value: [ :finalValue | ^finalValue ]
...
found := self valuedEscaper: [:escape |
1 to: 10 do: [ :x |
x = 3 ifTrue: [escape value: true].
]
false].
Oh geez. I think I just reinvented continuations. :)
That would be a perfect opportunity to employ
#valueWithPossibleArgument:.
- Bert -
_______________________________________________
Beginners mailing list
[email protected]
http://lists.squeakfoundation.org/mailman/listinfo/beginners