run<A> method
Run the computation and returns a tuple of the result and state.
Implementation
Tuple2<A, S> run<A>(State<S, A> state) {
final next = state(_state);
final previous = _state;
_state = next.second;
if (_controller != null && !identical(previous, _state)) {
_controller!.add(_state);
}
return next;
}