kotlin.collections.sumBy

sumBy

inline fun <T> Iterable<T>.sumBy(selector: (T) -> Int): Int

Returns the sum of all values produced by selector function applied to each element in the collection.

inline fun <T> Array<out T>.sumBy(selector: (T) -> Int): Int
inline fun ByteArray.sumBy(selector: (Byte) -> Int): Int
登录查看完整内容