mapBy<K, V> function

Map<K, V> mapBy<K, V>(
  1. Func1<V, K> getKey,
  2. Iterable<V> items
)

Creates map from items. Keys of the map are created by applying getKey function to the corresponding item of the list.

Implementation

Map<K, V> mapBy<K, V>(Func1<V, K> getKey, Iterable<V> items) =>
    _mapBy(getKey, items);