associate

inline fun <T, D : Dimension, K, V> MultiArray<T, D>.associate(transform: (T) -> Pair<K, V>): Map<K, V>

Returns a Map containing key-value pairs provided by transform function applied to elements of the given collection.

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

The returned map preserves the entry iteration order of the original collection.