pub trait Min: Ord {
// Required method
fn min() -> Self;
}
Expand description
最小元を持つ。
Examples
use nekolib::traits::Min;
let min: i8 = Min::min();
for x in std::i8::MIN..=std::i8::MAX {
assert!(x >= min);
}
pub trait Min: Ord {
// Required method
fn min() -> Self;
}
最小元を持つ。
use nekolib::traits::Min;
let min: i8 = Min::min();
for x in std::i8::MIN..=std::i8::MAX {
assert!(x >= min);
}