https://kotlinlang.org logo
#stdlib
Title
# stdlib
e

elect

08/01/2022, 8:11 AM
also
averageBy{ .. }
on iterables, as shortcut instead of
map{ }.average()
👍 1
r

Roukanken

08/01/2022, 8:12 AM
You can simply create an extension function that would do that
Same for the range thingie, actually
e

elect

08/01/2022, 8:13 AM
almost everything can be solved manually, but adding to the std-lib would make it useful for everyone
r

Roukanken

08/01/2022, 8:15 AM
right, my bad, didn't realize we were in #stdlib
e

elect

08/01/2022, 8:15 AM
np
e

ephemient

08/01/2022, 1:21 PM
it's not clear what the return type should be
e

elect

08/01/2022, 1:22 PM
1- we can infer 2- we have a lambda resolution by return type annotation available We can apply the same logic as
count{ }
7 Views