neighboring

inline fun <ID : Any, Shared> Aggregate<ID>.neighboring(local: Shared): Field<ID, Shared>

Observes the value of an expression local across neighbors.

Example

val field = neighboring(0)

The field returned has as local value the value passed as input (0 in this example).

val field = neighboring({ 2 * 2 })

In this case, the field returned has the computation as a result, in form of a field of functions with type () -> Int.