Groups items by grouping function.
The items to group.
A function that returns a key indicating which group the item belongs to.
An object containing groups, keyed by group key. The order of items is preserved within each group.
Groups items by grouping function.