Function malachite_base::num::exhaustive::exhaustive_unsigneds
source · pub fn exhaustive_unsigneds<T: PrimitiveUnsigned>() -> PrimitiveIntIncreasingRange<T> ⓘ
Expand description
Generates all unsigned integers in ascending order.
The output is $(k)_{k=0}^{2^W-1}$, where $W$ is the width of the type.
The output length is $2^W$.
§Complexity per iteration
Constant time and additional memory.
§Examples
use malachite_base::iterators::prefix_to_string;
use malachite_base::num::exhaustive::exhaustive_unsigneds;
assert_eq!(
prefix_to_string(exhaustive_unsigneds::<u8>(), 10),
"[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...]"
)