modPylon<T> method

void modPylon<T>(
  1. T modifier(
    1. T
    )
)

Applies a modifier function to the current value of the nearest ancestor MutablePylon of type T in this context, updating it with the result.

Implementation

void modPylon<T>(T Function(T) modifier) {
  MutablePylonState<T> v = MutablePylon.of<T>(this);
  v.value = modifier(v.value);
}