reduceRightIndexedOrNull

inline fun ComplexFloatArray.reduceRightIndexedOrNull(operation: (index: Int, ComplexFloat, acc: ComplexFloat) -> ComplexFloat): ComplexFloat?
inline fun ComplexDoubleArray.reduceRightIndexedOrNull(operation: (index: Int, ComplexDouble, acc: ComplexDouble) -> ComplexDouble): ComplexDouble?

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.

Parameters

operation

function that takes the index of an element, the element itself and current accumulator value, and calculates the next accumulator value.