grouping-by
This small library provides users the possibility of grouping their iterators of various ways. It is still in development and therefore is not recommended for production code. There will be breaking changes constantly.
It is similar to Java Collectors.groupingBy
Example:
let array: = ;
assert_eq!;
More advanced usage
// This returns for each year, the codes of the contracts with the most days.
contracts.iter.grouping_by_max // Returns `HashMap<i32, String>`
Usage
Just import the trait (use grouping_by::GroupingBy;
) into your crate and use it on your iterators.