StateAsync<S, A>.fromState constructor

StateAsync<S, A>.fromState(
  1. State<S, A> state
)

Build a new StateAsync by lifting a sync State to async.

Implementation

factory StateAsync.fromState(State<S, A> state) =>
    StateAsync((s) async => state.run(s));