Function malachite_base::iterators::comparison::is_strictly_descending
source · pub fn is_strictly_descending<I: Iterator>(xs: I) -> bool
Expand description
Determines whether each element of an iterator is less than the preceding one.
This function will hang if given an infinite strictly descending iterator.
$$ f((x_k)_{k=0}^N) = \bigwedge_{k=1}^N{x_k < x_{k-1}}, $$ where $N$ may be $\infty$.
§Examples
use malachite_base::iterators::comparison::is_strictly_descending;
assert_eq!(is_strictly_descending([4, 3, 2, 1].into_iter()), true);
assert_eq!(is_strictly_descending([4, 2, 2, 1].into_iter()), false);