iter_cartesian 0.1.0

A Cartesian product iterator with double-ended iteration and O(1) length queries.
Documentation
1
2
3
4
5
6
7
8
use iter_cartesian::CartesianExt;

fn main() {
    // nth, last, and count are all O(1).
    println!("{:?}", (0..100).cartesian(0..100).nth(5_000));
    println!("{:?}", (0..100).cartesian(0..100).last());
    println!("{}", (0..100).cartesian(0..100).count());
}