Import std.core.interfaces
Comparable
interface
Public Interface Comparable Extends Equatable
An order: what < says, which the other comparisons follow unless a type gives its own.
Examples
Struct Version Implements Comparable
Field Major: Int
Field Minor: Int
Operator <(a: Version, b: Version): Bool
Return a.Major < b.Major || a.Major == b.Major && a.Minor < b.Minor
End Operator
End Struct
Expect(Version(1, 2) < Version(1, 10))
Expect(Version(2, 0) >= Version(1, 9))
Expect(Max(Version(2, 0), Version(1, 9)).Major == 2)std/core/interfaces.fb, line 50
-
Whether
acomes beforeb. -
Whether
acomes afterb. -
Whether
acomes beforebor is equal to it. -
Whether
acomes afterbor is equal to it.
Report an issue with this page or with FutureBlitz on GitHub.