Run the provided udf over the array to reduce the values to a single output
ArrayReduce(array=[array], callback=[function:BiFunction], initialValue=[any])
Argument | Type | Required | Description | Default |
---|---|---|---|---|
array |
array |
true |
The array to reduce | |
callback |
function:BiFunction |
true |
The function to invoke for each item. The function will be passed 3 arguments: the accumulator, the current item, and the current index. You can alternatively pass a Java BiFunction which will only receive the first 2 args. The function should return the new accumulator value. |
|
initialValue |
any |
false |
The initial value of the accumulator |
- ArrayAppend
- ArrayAvg
- ArrayClear
- ArrayContains
- ArrayContainsNoCase
- ArrayDelete
- ArrayDeleteAt
- ArrayDeleteNoCase
- ArrayEach
- ArrayEvery
- ArrayFilter
- ArrayFind
- ArrayFindAll
- ArrayFindAllNoCase
- ArrayFindNoCase
- ArrayFirst
- ArrayGetMetadata
- ArrayIndexExists
- ArrayInsertAt
- ArrayIsDefined
- ArrayLast
- ArrayMap
- ArrayMax
- ArrayMedian
- ArrayMerge
- ArrayMid
- ArrayMin
- ArrayNew
- ArrayPop
- ArrayPrepend
- ArrayPush
- ArrayRange
- ArrayReduceRight
- ArrayResize
- ArrayReverse
- ArraySet
- ArrayShift
- ArraySlice
- ArraySome
- ArraySort
- ArraySplice
- ArraySum
- ArraySwap
- ArrayToList
- ArrayToStruct
- ArrayUnshift