You just inspired me to a block post on point-free programming :) http://smalltalkthoughts.blogspot.com/2011/08/point-free-programming-in-smal... Niko On 30.08.2011, at 16:57, HwaJong Oh wrote:
I have similar definitions from symbol to block for SortedCollection like;
#('3' '20' '100') asSortedCollection: #size ascendingSortBlock. "#('3' '20' '100')"
#size ascendingSortBlock evaluates to be [:a :b| (a perform: #size) <= (b perform:#size) ]
#('3' '20' '100') asSortedCollection: #size descendingSortBlock. "#('100' '20' '3')"
Similarly, following can be done
#('3' '20' '100') asSortedCollection: #first ascendingSortBlock. #('3' '20' '100') asSortedCollection: #first descendingSortBlock.
-- View this message in context: http://forum.world.st/Symbol-value-tp3778525p3778943.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- http://scg.unibe.ch/staff/Schwarz twitter.com/nes1983 Tel: +41786126354