symbol, value and 3.9

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

symbol, value and 3.9

Julian Daly-2

Hello,

How should the following (new for 3.9 ) be used?:

 

Symbol>>#value:

 

Thanks,

 

Julian



Reply | Threaded
Open this post in threaded view
|

Re: symbol, value and 3.9

Lukas Renggli
> How should the following (new for 3.9 ) be used?:

   (1 to: 10) collect: #squared

is the same as

   (1 to: 10) collect: [ :each | each squared ]

This can be quite convenient. Don't think this is a speed
optimization, because there is no block-activation. Strangely the line
with the block is slightly faster in 3.9.

Cheers,
Lukas



>
>
>
> Symbol>>#value:
>
>
>
> Thanks,
>
>
>
> Julian
>
>
>
>


--
Lukas Renggli
http://www.lukas-renggli.ch