Skip to content

Latest commit

 

History

History
57 lines (45 loc) · 2.08 KB

File metadata and controls

57 lines (45 loc) · 2.08 KB

Function: QueryReduce

This function reduces the query to a single value.

Method Signature

QueryReduce(query=[query], callback=[function:BiFunction], initialValue=[any])

Arguments

Argument Type Required Description Default
query query true The query to iterate over
callback function:BiFunction true The function to invoke for each item. The function will be passed 4 arguments: the accumulator, the current item, the current index, and the query. You can alternatively pass a Java Predicate which will only receive the first 2
args.
initialValue any true The initial value to use for the reduction

Examples

Related