associate To
abstract fun <K, V, M : MutableMapWrapper<in K, in V>> associateTo(destination: M, transform: (T) -> Pair<K, V>): M
使用 transform 函数将每个元素转换为一个键值对,并将结果存储到 destination 中。
Return
destination,以便链式调用。
Parameters
destination
用于存储结果的 MutableMapWrapper。
transform
用于将每个元素转换为键值对的函数。