itertools
itertools copied to clipboard
process_results on the Itertools trait
A typical use-case for process-results is e.g.
let final_map = itertools::process_results(
some
.long()
.chain()
.of()
.iterator()
.adapters(),
|it| it.into_group_map(),
)?;
With the chain of iterator adapters getting longer and longer, this writing becomes less and less readable.
=> It would be much nicer to be able to write:
let final_map = some
.long()
.chain()
.of()
.iterator()
.adapters()
.process_results(|it| it.into_group_map())?;
This would be pretty easy to do by adding process_results in the Itertools
trait.