itertools
itertools copied to clipboard
Extra iterator adaptors, iterator methods, free functions, and macros.
Hi folks. Is the iterize() function demonstrated below of any interest? It's rather like itertools::iterate(), making it easy to create a certain class of iterators via something like induction. But...
I'd like to use a shared iterator to dispense work items to threads, but it seems I can't. Is this intentional? Is there a better way to do this with...
Our current `join` only outputs `String`, maybe we should consider using the nightly `Join` in standard library? I created a pull request using that in standard library but I noticed...
Similar to #522, which defines `flatten_ok`, there could also be a `flat_map_ok` which operates on an `IntoIter`, applies a function to `T` if the value is `Ok` and flattens the...
Currently, trying to get 'permutations with replacement', it's hard to find in the documentation how to do that. I eventually found on the github from the issue about adding permutations...
I wonder if we should have a `deref_cloned()` that did `.map(|s| (*s).clone())`? I see a few situations where people do cloned().cloned() to achieve the same effect (though I suspect that's...
## Issue `try_fold` is capable of folding an iterator until a short-circuiting condition is met. For instance, the [short-circuiting example in the docs](https://doc.rust-lang.org/std/iter/trait.Iterator.html#examples-28) sums up integers until an integer overflow...
Thanks for itertools! It's super useful :) I do have one feature request: I love the Cartesian product iterators because they were just what I wanted for a use case,...
Closes #330 . Sometimes we need to iterate over all possible combinations of an infinite iterator. This means that every combination must be eventually met. This PR implements such a...
An incremental sort would make an excellent addition to itertools's lazy iterator model. The basic idea of an incremental sort is that you can sort the sequence one element at...