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

Feature request: add methods like `map_err` that work on errors only, similar to `map_ok`. To match the existing `_ok` methods, that would be: - `filter_map_err` - `filter_err` - `flatten_err` -...

fallible-iterator

So that code like this: ```rust iproduct!(0..4, 0..4, 0..4) ``` becomes the more succinct: ```rust iproduct!(0..4; 3) ``` This would mandate vectors instead of tuples for the items. It would...

enhancement
help wanted

Currently, it's impossible to use `next_tuple` and similar tuple methods for unit type, even though such an impl could just return empty tuple on each call, without advancing inner iterator.

If you replace: `iterable.into_iter().join(sep)` With ``` iterable.map(AsRef::as_ref) .collect::() .join(sep) ``` in Itertools::join the performance is 2X faster.

An alternative to `TupleCombinations` that works in a similar fashion to the standard `Combinations` iterator. It's implemented using const generics and manages to work for >12 elements too. Another benefit...

const-generics

Hi! It seems to me that itertools is quite low on maintenance power – a fairly big amount of PRs have the waiting-on-review tag, some are untagged and some issues...

On the back of #547, starts implementing some more array features. This one includes the `arrays` adapter and `next_array` method. They work exactly like their tuple counter parts. It defines...

const-generics

Discussed in #546 where I've written an alternative to `tuple_combinations`, `array_combinations` which is an iterator that outputs `[T; N]`. This feature requires const generics which were introduced in Rust 1.51....

const-generics

Some rough code (the trait bounds aren't exactly correct yet) ```rust fn flat_map_producto(self, rhs: impl FnMut(&Self::Item) -> J) -> impl Iterator where J: impl Iterator, Self::Item: Clone { self.flat_map(|e| rhs(e).map(|r|...

Currently this crate does has no README.md (and no readme key in Cargo.toml) causing it to be rendered without a README on crates.io. Why is that bad? Crates which miss...