update method

void update(
  1. T updates(
    1. T v
    )
)

Implementation

void update(T Function(T v) updates) {
  value = updates(read());
}