itertools
itertools copied to clipboard
Extra iterator adaptors, iterator methods, free functions, and macros.
The pipline takes significant ammount of time. Think there is a better way of doing this. - [x] 1. ~~run `cargo bench --no-run` insdead of `cargo bench` as they take...
Please add a fallible version of `partition_map` that allows the closure to return `Result`. It would be easy, by using the for loop again and write `match predicate(val)? ` :)...
It'd be nice to have a version of `all_equal` that returns the value in the iterator where all the items in the iterator compare equal to that value. Proposed implementation:...
# Issue `partition_map` enables you to split an iterator into 2 separate collections. You can choose if you want to put the current item into the `Left` collection by returning...
I spent several hours debugging my code written using the `group_by` function. I expected from this function the logic of grouping the same objects by a key, how surprised I...
This method is like the existing `map_results`, but allows the provided closure to potentially fail with an `Err` value of its own on each input. The `Err` values from both...
Would there be interest in adding a variant of `unique` which allows you to specify the hasher? How about the name `unique_default`? The name isn't great but it's the best...
# What parts of Itertools are solid enough for std? ## `.join(sep: &str) -> String` `where Self::Item: Display` - **Pro** Very popular, easy to use - **Con** Using `Display` is...
I'm opening this to request/discuss a possible Grouping API like Kotlin's `Grouping`/`groupingBy` API. See Kotlin's [Grouping reference](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-grouping/) and its [source code](https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/src/kotlin/collections/Grouping.kt). It would provide an easy way to perform efficient...