itertools
itertools copied to clipboard
Extra iterator adaptors, iterator methods, free functions, and macros.
Would it be possible to implement `MultiUnzip` on `Option` to make something like that possible to implement? ```rust struct A { a: u32, b: u32, c: u32, } let opt...
```rs use std::collections::HashMap; use itertools::Itertools; fn main() { let numbers = vec![1, 2, 3, 4, 5, 6]; let chunks: HashMap = numbers .into_iter() .chunk_by(|number| number % 2) .into_iter() .map(|(k, v)|...
Would be great to have a helper to calculate the mean of an iterator of items which are both summable and divisable, by summing the elements and then dividing by...
It seems to be a fair expectation that `all_equal_value().is_ok()` should agree with `all_equal()`. But on an empty iterator the former returns false, while the latter returns true. Can be resolved...
Bumps [obi1kenobi/cargo-semver-checks-action](https://github.com/obi1kenobi/cargo-semver-checks-action) from 2.4 to 2.6. Release notes Sourced from obi1kenobi/cargo-semver-checks-action's releases. v2.6 What's Changed Fix npm vulnerabilities by @memark in obi1kenobi/cargo-semver-checks-action#85 Add CONTRIBUTING.md by @memark in obi1kenobi/cargo-semver-checks-action#84 Full Changelog:...
Managed to get it to work with Box, maybe it can be further optimized by defining a custom iterator. I use it a lot, it's very helpful ```rust use std::iter::once;...
Add `split()` that produces an iterator that takes from original iterator until a specific condition. This fixes some issues I have with `take_while()`. (I find the method name confusing personally...
If I use `iter.by_ref().chunks(n)` and consume `k` of the chunks, I expect exactly `k*n` items to be consumed from `iter`. But this is not the case as the failing assertion...
Added an implementation of `arrays` based on the work in `next_array()`. Currently the `N = 0` produces a post-monomorphization error, see the discussion in #1012. Some other choices that I'm...