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