Function malachite_nz::integer::exhaustive::exhaustive_negative_integers
source · pub const fn exhaustive_negative_integers(
) -> IntegerDecreasingRangeToNegativeInfinity ⓘ
Expand description
Generates all negative Integer
s in descending order.
The output length is infinite.
§Worst-case complexity per iteration
$T(i) = O(i)$
$M(i) = O(1)$, amortized.
where $T$ is time, $M$ is additional memory, and $i$ is the iteration number.
§Examples
use malachite_base::iterators::prefix_to_string;
use malachite_nz::integer::exhaustive::exhaustive_negative_integers;
assert_eq!(
prefix_to_string(exhaustive_negative_integers(), 10),
"[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, ...]"
)