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

As of today, `Iterator::map_windows` is nightly: fn map_windows(self, f: F) -> MapWindows where Self: Sized, F: FnMut(&[Self::Item; N]) -> R; But I'm wondering if we should have a version of...

#755 This PR introduces a custom fold method for `TakeWhileRef`. The optimization hinges on the `fold_while` logic: Benchmark Results: Default fold: time: [53.963 ns 54.083 ns 54.209 ns] Custom fold:...

We have `FilterMapOk` and we have `Positions`. I think we should make `type FilterMapOk = FilterMapSpecialCase` and `type Positions = FilterMapSpecialCase`. Would enforce consitency for `DoubleEndedIterator`, fusedness, etc.

Would like to request an `_exact` version of the `chunks` method akin to how slices work. I believe this would be useful functionality.

waiting-on-author

This PR adds `map_err` and `err_into` methods to `Itertools`. * `.map_err(f)` is just like `.map_ok(f)`, but it applies `f` to each _`Result::Err`_ value. * `.err_into()` is simply `.map_err(Into::into)`. These methods...

fallible-iterator

I really like `group_by`, but there is a limitation I sometimes run into, when transforming iterators, due to the temporary values. Currently that forces to consume the group_by always locally....

Implementing `fold` for our iterators allows us to provide more performant internal iteration. We provide it in some cases, but not all. I'd like us to take three steps towards...

help wanted
performance

In my book, `InterleaveShortest` should not produce more items than `Interleave`, but so far it did for unfused source iterators. This PR brings `InterleaveShortest` in line with Interleave. The documentation...

Similar to #601 but for all our iterators and iterator adaptors. Laziness reference: https://doc.rust-lang.org/std/iter/index.html#laziness And I think each iterator struct should have the related `must_use` attribute: - Adaptors: `#[must_use =...

I just created the label "fallible-iterator" and labelled (only opened) related issues and pull requests where the iterator item is fallible: results mostly, options too. It's one recurring topic, and...

fallible-iterator
roadmap