itertools
itertools copied to clipboard
Extra iterator adaptors, iterator methods, free functions, and macros.
With this pull request I add two new functions to the `Itertools` trait: ```rust fn next_array(&mut self) -> Option where Self: Sized + Iterator; fn collect_array(mut self) -> Option where...
I am currently looking for a fold-like iterator adaptor but instead of producing one folded value it produces many partial ones. Example code: ```rust trait IteratorEx: Iterator { // `Result`...
it would be a really useful API to have a powerset + filter api whereby we can express a predicate such that if S is subset of U, and P(S)...
Fixes #557
I can write a quick PR.
Currently this crate only has `k_smallest`. Compare this to the offering for `min`/`max` (which are the same function, just limited to k = 1): ``` position_max position_max_by position_max_by_key position_min position_min_by...
A `BTreeMap` version of the `into_group*` function group would be a nice addition. The idea is that sometimes working with `Hash` is not feasible or even impossible, e.g. when you...
I want to use FxHash for some HashMaps for speed, but into_grouping_map seems to be restricted to the builtin hasher. It would be great if this could be even more...
The documentation for `.tee()` says: > Split into an iterator pair that both yield all elements from the original iterator. It's not obvious from the documentation, but with the current...
The `tuple_windows` function is very useful, but I've found myself using something like the following quite often — it's very useful when processing anything circular in nature, but represented as...