asSortBlock is implemented in CodeFoo and CodeFoo is apparently under
MIT (see the bundle comments in VW).
anyway, another implementation would be:
^ [:a :b | (a value: self) <= (b value: self)]
On 30 Mar 2009, at 19:55, Simon Denier wrote:
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)
"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.
nextPutAll: '[:a :b | a ';
nextPutAll: ' <=b ';
^Compiler evaluate: stream contents
Moose-dev mailing list
"Every now and then stop and ask yourself if the war you're fighting
is the right one."