modify<S> function

State<S, Unit> modify<S>(
  1. S f(
    1. S s
    )
)

Modify the state with the given transformer function

Implementation

State<S, Unit> modify<S>(S Function(S s) f) => State((s) => tuple2(unit, f(s)));