itertools icon indicating copy to clipboard operation
itertools copied to clipboard

Extra iterator adaptors, iterator methods, free functions, and macros.

Results 211 itertools issues
Sort by recently updated
recently updated
newest added

Sometimes there is not enough information available for adapters to correctly deduce a useful size hint. However, a developer might have more information and this new iterator method allows them...

enhancement
waiting-on-author

I [asked about this in Rayon](https://github.com/rayon-rs/rayon/issues/689), but the functionality is not actually specific to parallelism, so I've copied my request here instead: > Is there a way to get "chunks"-like...

I think requiring only `PartialOrd` instead of `Ord` is not optimal for `minmax`: ``` // Concern 1: different behaviour than min/max let vec = [std::f64::NAN, 1.]; //vec.iter().min(); // does not...

Adds feature requested by #293 Helper iterator adapter to make calculating all combinations easier.

waiting-on-review

Implements #242 as a new function called `multizip_fallback` which takes a tuple of tuples as an argument where the inner tuples are the subiterators and their respective fallback values. Most...

Fixes #264. I've added a new macro, `iproduct_arr`, which can be called in the same way as `iproduct` (but only when all iterators are the same type) or using the...

Allow `MultiProduct` to yield collections other than `Vec`. The main value is that callers can specify non-allocating types like `SmallVec`, meaning that iteration over a multi-cartesian product can be non-allocating....

waiting-on-review
generic-container

Similar to `map_results`, this combinator would allow the mapping function to return an error. The `Item` type of the iterator would be any `Result where E1: Into, E2: Into`.

fallible-iterator

Is it not possible to re-implement `chunks` for `no_std`? One issue I can see is that multiple iterators might exist simultaneously, complicating things. The only solution I can see (there...

One would expect ```rust for v in (0..n).map(|_| &[0, 1]).multi_cartesian_product() { println!("{:?}", v); } ``` to enumerate all {0, 1} vectors of length `n`. However, it fails when `n ==...