sumBy

inline fun ByteBuffer.sumBy(selector: (Byte) -> Int): Int
inline fun ShortBuffer.sumBy(selector: (Short) -> Int): Int
inline fun IntBuffer.sumBy(selector: (Int) -> Int): Int
inline fun LongBuffer.sumBy(selector: (Long) -> Int): Int
inline fun FloatBuffer.sumBy(selector: (Float) -> Int): Int
inline fun DoubleBuffer.sumBy(selector: (Double) -> Int): Int
inline fun CharBuffer.sumBy(selector: (Char) -> Int): Int

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