fold

abstract fun <T> fold(initial: T, operation: (acc: T, Double) -> T): T

Folds the array with an initial value and an operation.

Return

the folded value

Parameters

initial

the initial value

operation

the operation