hood With Id
inline fun <ID : Any, T> Field<ID, T>.hoodWithId(default: T, crossinline transform: (Pair<ID, T>, Pair<ID, T>) -> Pair<ID, T>): T
Reduce the elements of the field using the transform function, returning the default value if the field to transform is empty. The local value is not considered.
The transform function takes two pairs: the former represents the accumulated value (including the ID), while the latter represents the current entry of the neighboring field that should be combined.
Use this function when the ID should be propagated during the reduce operation.
inline fun <ID : Any, T> Field<ID, T>.hoodWithId(default: T, crossinline transform: (T, ID, T) -> T): T
Reduce the elements of the field using the transform function, it includes the ID of the element whenever it should be considered in the transform function, but the ID is not returned. The local value of the field is not considered. Returns the default if the field to transform is empty.