runningReduce
inline fun ByteBuffer.runningReduce(operation: (acc: Byte, Byte) -> Byte): List<Byte>
Content copied to clipboard
inline fun ShortBuffer.runningReduce(operation: (acc: Short, Short) -> Short): List<Short>
Content copied to clipboard
inline fun IntBuffer.runningReduce(operation: (acc: Int, Int) -> Int): List<Int>
Content copied to clipboard
inline fun LongBuffer.runningReduce(operation: (acc: Long, Long) -> Long): List<Long>
Content copied to clipboard
inline fun FloatBuffer.runningReduce(operation: (acc: Float, Float) -> Float): List<Float>
Content copied to clipboard
inline fun DoubleBuffer.runningReduce(operation: (acc: Double, Double) -> Double): List<Double>
Content copied to clipboard
inline fun CharBuffer.runningReduce(operation: (acc: Char, Char) -> Char): List<Char>
Content copied to clipboard
Returns a list containing successive accumulation values generated by applying operation from left to right to each element and current accumulator value that starts with the first element of this array.
Samples
kool.buffers.Collections.Aggregates.runningReduce
Parameters
operation
function that takes current accumulator value and an element, and calculates the next accumulator value.