put method

State<S, Unit> put(
  1. S state
)

Set a new state and return nothing (Unit).

Implementation

State<S, Unit> put(S state) => State((_) => (unit, state));