I need the following method from VW to run some tests in SqMoose. Does
anybody have an idea about its licence? Does not seem to be part of
our own extensions :(
It's not especially difficult to reimplement one, anyone can come up
with a Squeak/Pharo equivalent (although it works as is under Pharo,
perhaps there is a better way)
Symbol>>asSortBlock
"Answer a sort block, which evaluates this symbol for both arguments
and compares the resulting values"
| stream |
stream := (String new: self size * 2 + 14) writeStream.
stream
nextPutAll: '[:a :b | a ';
nextPutAll: self;
nextPutAll: ' <=b ';
nextPutAll: self;
nextPut: $].
^Compiler evaluate: stream contents
--
Simon