associateTo

inline fun <E : Any, K, V, M : MutableMap<in K, in V>> EntitySequence<E, *>.associateTo(destination: M, transform: (E) -> Pair<K, V>): M(source)

Populate and return the destination mutable map with key-value pairs provided by transform function applied to each element of the given sequence.

If any of two pairs would have the same key the last one gets added to the map.

The operation is terminal.