reduceRight

inline fun ComplexFloatArray.reduceRight(operation: (ComplexFloat, acc: ComplexFloat) -> ComplexFloat): ComplexFloat
inline fun ComplexDoubleArray.reduceRight(operation: (ComplexDouble, acc: ComplexDouble) -> ComplexDouble): ComplexDouble

Accumulates value starting with the last element and applying operation from right to left to each element and current accumulator value.

Throws an exception if this array is empty. If the array can be empty in an expected way, please use reduceRightOrNull instead. It returns null when its receiver is empty.

Parameters

operation

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