groupByMultipleKeys

inline fun <K, V> Iterable<V>.groupByMultipleKeys(keysSelector: (V) -> Iterable<K>, onDuplicate: (K, V, V) -> Unit = { key, value1, value2 -> throw IllegalArgumentException("Duplicate mapping for $key ($value1, $value2)") }): Map<K, V>

Map the elements of the Iterable to multiple keys. By default duplicate mappings are not allowed. The returned Map preserves the iteration order of the values.