pub fn is_strictly_ascending<I: Iterator>(xs: I) -> bool where
    I::Item: Ord
Expand description

Determines whether each element of an iterator is greater than the preceding one.

This function will hang if given an infinite strictly ascending 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_ascending;

assert_eq!(is_strictly_ascending([1, 2, 3, 4].into_iter()), true);
assert_eq!(is_strictly_ascending([1, 2, 2, 4].into_iter()), false);