[ENH] Symbol value:
Stephen T. Pope
stp at create.ucsb.edu
Mon Feb 28 17:38:25 UTC 2000
Adds the methods value: and value:value: to Symbol (which do #perform: and
#perform:with:, respectively) so that symbols can be interchanged with blocks.
--
stp
Stephen Travis Pope
stp at create.ucsb.edu -- http://www.create.ucsb.edu/~stp
-------------- next part --------------
"Change Set: Symbol-value
Date: 23 Feb 2000
Author: Stephen Travis Pope
Adds the methods value: and value:value: to Symbol (which do #perform: and #perform:with:, respectively) so that symbols can be interchanged with blocks."
'From Squeak2.8alpha of 13 January 2000 [latest update: #1852] on 20 February 2000 at 10:54:09 pm'!
!Symbol methodsFor: 'converting' stamp: 'stp 02/20/2000 22:54'!
value: anObject
"Perform the receiver symbol on the argument object, i.e.,
#r value: (3 at 4)
is the same as
[ :pt | pt r] value: (3 at 4) "
^anObject perform: self! !
!Symbol methodsFor: 'converting' stamp: 'stp 02/20/2000 23:56'!
value: anObject value: otherObject
"Perform the receiver symbol on the argument object, i.e.,
#truncateTo: value: (32 at 44) value: 5 at 5
is the same as
[ :pt :off | pt truncateTo: off] value: (32 at 44) value: 5 at 5 "
^anObject perform: self with: otherObject! !
More information about the Squeak-dev
mailing list
|