sumBy

inline fun <T> Array<out T>.sumBy(selector: (T) -> Int): Int (source)
inline fun ByteArray.sumBy(selector: (Byte) -> Int): Int (source)
inline fun ShortArray.sumBy(selector: (Short) -> Int): Int (source)
inline fun IntArray.sumBy(selector: (Int) -> Int): Int (source)
inline fun LongArray.sumBy(selector: (Long) -> Int): Int (source)
inline fun FloatArray.sumBy(selector: (Float) -> Int): Int (source)
inline fun DoubleArray.sumBy(selector: (Double) -> Int): Int (source)
inline fun BooleanArray.sumBy(
    selector: (Boolean) -> Int
): Int
(source)
inline fun CharArray.sumBy(selector: (Char) -> Int): Int (source)

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

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

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