noctarius
01/11/2017, 4:12 PMprivate fun <K : Any, V : Any, R : Any> Map<K, List<V>>.mapEachValue(mapper: (Map.Entry<K, V>) -> R): Map<K, List<R>> {
class SimpleEntry(override val key: K, override val value: V) : Map.Entry<K, V>
return this.mapValues { entry -> entry.value.map { mapper(SimpleEntry(entry.key, it)) } }
}