Comparable
suggest changeSyntax
include Comparable- implement the space-ship operator (
<=>)
Parameters
Parameter | Details |
——— | —–– |
other | The instance to be compared to self |
Remarks
x <=> y should return a negative number if x < y, zero if x == y and a positive number if x > y.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents