orangy
fun <T,K> Iterable<T>.name1(selector: (T)->K) : Map<K, T>
fun <T,K,V> Iterable<T>.name1(selector: (T)->K, transform: (T)->V) : Map<K, V>
fun <T,K,V> Iterable<T>.name2(selector: (T)->Pair<K,V>) : Map<K, V>
name2 should be different but derived from name1 due to #1 and #3 signature would be otherwise ambiguous
it should also support name1To and name2To variants for passing existing Map
currently these functions are toMap and toMapBy, but there are number of issues:
- inconsistent with other functions, like filter and filterTo
- confusing mapTo and toMap
Any ideas?