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

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)? ` :)...

fallible-iterator

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...

Follow up from: #326

waiting-on-review

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...

waiting-on-review
fallible-iterator

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...

generic-container

# 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...