Gt
trait Gt<T>
Source: compiler/src/builtin_docs/prelude/ops.hy The greater-than operator >.
a > b on a type with a Gt instance calls gt(a, b).
Required methods#
| Name | Description |
|---|---|
gt | Returns true when a is greater than b. |
Examples#
use tests::assert;
class Version {
pub n: int,
}
impl Gt for Version {
pub fn gt(Version a, Version b) -> bool {
return a.n > b.n;
}
}
fn main() {
assert!(new Version(3) > new Version(2));
}