And more generally these kind of holes in #stdlib where we have
Iterable<Long>.sum()
, but not
List<*>.sumByLong
(like we have
sumBy
for ints and
sumByDouble
).
i
ilya.gorbunov
06/02/2017, 3:02 PM
mg6maciej: We have postponed adding a lot of such variants until the resolution of https://youtrack.jetbrains.com/issue/KT-11265 becomes clear. In case it is implemented, we can have only one function,
sumBy
and overload it by the return type of the selector.
m
mg6maciej
06/04/2017, 12:58 PM
Makes sense. I'd like to have this implemented although I see how it's problematic to do so.