map<S, A, B> function
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);
});