Another naming brainstorm request. We need a name ...
# random
o
Another naming brainstorm request. We need a name for a set of functions:
Copy code
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?