Crate extrema[−][src]
Expand description
Utility for finding the minimum and maximum values of a collection. Similar to C++’s minmax_element, Julia’s extrema and Ruby’s minmax.
Quick Start:
Just call it on any iterable collection!
let my_set: HashSet<i32> = (1..300).collect();
let (min, max) = my_set.iter().extrema().unwrap();
assert_eq!((min, max), (&1, &300));
Traits
By implementing Extrema
on a collection you will be able to
find its minimum and maximum elements.