#group #aggregate

groupable

Easily aggregate groups of values from key-value Iterators

2 unstable releases

Uses old Rust 2015

0.2.0 Apr 3, 2015
0.1.0 Apr 3, 2015

#39 in #aggregate

Download history 1383/week @ 2024-07-20 1171/week @ 2024-07-27 1315/week @ 2024-08-03 1893/week @ 2024-08-10 1546/week @ 2024-08-17 1076/week @ 2024-08-24 1033/week @ 2024-08-31 1264/week @ 2024-09-07 1135/week @ 2024-09-14 1557/week @ 2024-09-21 1792/week @ 2024-09-28 1365/week @ 2024-10-05 1803/week @ 2024-10-12 2611/week @ 2024-10-19 1291/week @ 2024-10-26 1420/week @ 2024-11-02

7,257 downloads per month
Used in 41 crates (via nickel)

MIT license

4KB
53 lines

Easily aggregate groups of values from key-value Iterators.

Example

use std::collections::HashMap;
use groupable::Groupable;

let evens = (0..10).map(|i| (i % 2 == 0, i))
                   .group::<HashMap<bool, Vec<usize>>>();

assert_eq!(evens[&true], [0, 2, 4, 6, 8]);
assert_eq!(evens[&false], [1, 3, 5, 7, 9]);

No runtime deps