neighboring

abstract fun <Scalar> neighboring(local: Scalar): Field<ID, Scalar>

Observes the value of an expression local across neighbours.

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.