reduce Right Indexed Or Null
inline fun ByteBuffer.reduceRightIndexedOrNull(operation: (index: Int, Byte, acc: Byte) -> Byte): Byte?
Content copied to clipboard
inline fun ShortBuffer.reduceRightIndexedOrNull(operation: (index: Int, Short, acc: Short) -> Short): Short?
Content copied to clipboard
inline fun IntBuffer.reduceRightIndexedOrNull(operation: (index: Int, Int, acc: Int) -> Int): Int?
Content copied to clipboard
inline fun LongBuffer.reduceRightIndexedOrNull(operation: (index: Int, Long, acc: Long) -> Long): Long?
Content copied to clipboard
inline fun FloatBuffer.reduceRightIndexedOrNull(operation: (index: Int, Float, acc: Float) -> Float): Float?
Content copied to clipboard
inline fun DoubleBuffer.reduceRightIndexedOrNull(operation: (index: Int, Double, acc: Double) -> Double): Double?
Content copied to clipboard
inline fun CharBuffer.reduceRightIndexedOrNull(operation: (index: Int, Char, acc: Char) -> Char): Char?
Content copied to clipboard
Accumulates value starting with the last element and applying operation from right to left to each element with its index in the original array and current accumulator value.
Returns null
if the array is empty.
Samples
kool.buffers.Collections.Aggregates.reduceRightOrNull
Parameters
operation
function that takes the index of an element, the element itself and current accumulator value, and calculates the next accumulator value.