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

I haven't found a way to make a pattern like this work: ``` let inputs = vec![(Ok(1), 2, 3), (Ok(4), 5, 6), (Ok(7), 8, 9)]; let (a, b, c): (Vec,...

I noted 5 months ago that edition 2021 requires rustc 1.56+ so it's now possible. _Is there any reason to not update?_

Similar to `iter.zip(repeat_n(val, n))' but does not require knowing n

Note: I am primarily seeking feedback rather than proposing at this stage. ## Peekable As I see it [`peekable` (Existing in std)] facilitates two concepts, the ability to preview an...

Debian CI revealed that the test combinations_inexact_size_hints fails on 32-bit architectures with an integer overflow https://ci.debian.net/packages/r/rust-itertools/testing/i386/52667389/#S9 605s ---- combinations_inexact_size_hints stdout ---- 605s thread 'combinations_inexact_size_hints' panicked at /usr/src/rustc-1.80.1/library/core/src/iter/traits/accum.rs:149:1: 605s attempt to...

I would like to have a method on "peekable" iterators with roughly the following signature and behavior similar to `PeekingNext::peeking_next`: ```rust fn peeking_next_map(&mut self, parse: impl FnOnce(&Self::Item) -> Option) ->...

Hey, I would like to propose adding a method `batch_by` (I don't know if this is the best name, however I'll use it here). * `batch_by` would allow you to...

Example from documentation `((A, B), C) -> (A, B, C)` [works pretty well](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c5c5186980e0d98a6d1046e75612b6cc)! ```rust use itertools::*; fn main() { let one_two = std::iter::once((1, 2)); let three = std::iter::once(3); dbg!(cons_tuples(izip!(one_two, three)).collect::());...

It seems `itertools` has a few outdated development dependencies. I recommend updating them to their latest version, if for no other reason than you'll be running with the latest code....

Add a `join()` operator with `prefix`, `sep` and `suffix`. `assert_eq!([1, 2, 3].iter().join(""), "");`