Extensions to the core Dict library.
Group a list of items by a key.
Supply an indexing function (eg. .id) and a list of
items. groupBy returns a dictionary of group-key/list-of-items.
If the indexing function returns a unique key for every item, consider indexBy instead.
Create a frequency-map from the given list.
Turn a list of items into an indexed dictionary.
Supply an indexing function (eg.
.id) and a list of items.indexByreturns a dictionary with each item stored under its index.This code assumes each index is unique. If that is not the case, you should use
groupByinstead.