[squeak-dev] The Trunk: Kernel-nice.873.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Sep 19 20:46:46 UTC 2014
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.873.mcz
==================== Summary ====================
Name: Kernel-nice.873
Author: nice
Time: 19 September 2014, 10:45:30.606 pm
UUID: c17d3346-f7e5-49c3-8939-91c7606954ef
Ancestors: Kernel-eem.872
Add spaceship operator support <=> usefull for sort functions.
=============== Diff against Kernel-eem.872 ===============
Item was added:
+ ----- Method: Magnitude>><=> (in category 'sorting') -----
+ <=> anotherObject
+ "Return a collation order of -1, 0, or 1, indicating whether I should be collated before the receiver, am equal, or after.
+ See also: http://en.wikipedia.org/wiki/Spaceship_operator"
+
+ ^self = anotherObject
+ ifTrue: [0]
+ ifFalse: [self < anotherObject ifTrue: [-1] ifFalse: [1]]!
More information about the Squeak-dev
mailing list
|