## std.compare: Interfaces for comparable types. ## reference: https://doc.rust-lang.org/std/cmp ## The Eq interface pub type Eq = interface ==(Self, Self): bool ## A possible Equivalence interface. # equality, equivalence, isomorphism, homomorphism, congruence # pub type Equiv = interface # ... pub type PartialOrd = interface <(a: Self, b: Self): bool pub type Ord = interface <(a: Self, b: Self): bool ==(a: Self, b: Self): bool pub !=[T: Eq](a: T, b: T): bool = not a == b pub func >[T: PartialOrd](a: T, b: T): bool = b < a pub func <=[T: Ord](a: T, b: T): bool = a < b or a == b pub func >=[T: Ord](a: T, b: T): bool = a > b or a == b