reduceValues

inline fun <ID : Any, T> Field<ID, T>.reduceValues(crossinline reducer: Reducer<T>): T?

Reduces the field values to a single value using the given reducer function, excluding the local element.

This is a convenience reduction applied only to the field values. If there are no neighbors, the result is null.

Return

the result of the reduction, or null if the field has no neighbors.

Parameters

reducer

a binary operation that reduces two values into one.