flatMap<C> method
Used to chain multiple functions that return a State.
Implementation
@override
State<S, C> flatMap<C>(covariant State<S, C> Function(A a) f) =>
State((state) {
final tuple = run(state);
return f(tuple.$1).run(tuple.$2);
});