map<S, A, B> function

State<S, B> Function(State<S, A>) map<S, A, B>(
  1. B f(
    1. A a
    )
)

Transform the value of the State (the A type)

Implementation

State<S, B> Function(State<S, A>) map<S, A, B>(B Function(A a) f) =>
    (fa) => State((sa) {
          final next = fa(sa);
          return tuple2(f(next.first), next.second);
        });