ToMap<T> extension

on

Methods

toMap<E>(E mapper(T element)) Map<T, E>

Available on List<T>, provided by the ToMap extension

Converts the list into a map where each element of the list is a key, and the value is generated by applying the mapper function to each element.