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

This issue tracks two complimentary directions for improving our specialization tests: - @Philippe-Cholet noted that our specialization tests do not currently test partially-consumed iterators. - We should extend our specialization...

The use of tuples in Itertools::tuples() and friends is questionable: - It suggests that type heterogeneity in iterator output is possible, which isn't accurate - It requires underscore-heavy turbofishes in...

breaking-change
const-generics

In addition to the tuple impls, it would be nice to have array impls for this.

const-generics

Copy and pasted from the [libs-team api change proposal ](https://github.com/rust-lang/libs-team/issues/152)which likely isn't going through. Would this crate be a good place for an addition like this? # Proposal ## Problem...

const-generics

Following the logic of _https://github.com/rust-itertools/itertools/issues/709#issuecomment-1616526337_: > I looked at the methods in `trait Iterator` to find the way the "std" considers "iterator ownership". > There are 4 cases: > >...

breaking-change

I've run into a pattern that I'm surprised isn't an iterator method or extension already (or if it is, I haven't found it): ```rust let slice = b"Hello world!"; let...

`peeking_next(&mut self, accept: impl FnOnce(..) ->bool)` can be implemented in terms of `peek(&mut self) -> Option` and `next`. Conversely, `peek` can be implemented in terms of `peeking_next`. So, they are...

I don't find iterator adapter like [`itertools.accumulate(iterable[, func, *, initial=None])`](https://docs.python.org/3/library/itertools.html#itertools.accumulate) in Rust itertools. It would be nice to add it in.

Same as `cycle` but with finite number of repeats.

question

Starting with the use case that prompted this: ```Rust fn get_dir(path: &path::Path) -> io::Result { path.read_dir()? .filter_map(|content| content.ok()) .filter_partition(|content| content.file_type().ok().and_then(|file_type| file_type.is_file()) } ``` Basically the same thing as the normal...