[squeak-dev] Re: The Trunk: Collections-ul.401.mcz
leves at elte.hu
Wed Nov 3 14:34:50 UTC 2010
On Wed, 3 Nov 2010, laza wrote:
> commits-2 wrote:
>> - added Symbol >> #cull:, so unary symbols can be used instead of monadic
>> blocks where #cull: is sent to them (e.g. #ifNotNil:)
> Sorry, I haven't followed any discussion on this. The intention is to be
> able to write stuff like this?
#ifNotNil: was just an example, in the core image there's also #on:do: and
#onDNU:do: that can be written like this. It's compatible with VW and
Pharo 1.2 (and probably with other dialects too).
Here's a short thread about it:
> anInteger ifNotNil: #squared.
> aCollection ifNotNil: #average.
> instead of
> anInteger ifNotNil: [:i | i squared].
> aCollection ifNotNil: [:c | c average].
> View this message in context: http://forum.world.st/The-Trunk-Collections-ul-401-mcz-tp3024077p3025178.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
More information about the Squeak-dev