gets method
Change the value getter based on the current state S
.
Implementation
State<S, A> gets(A Function(S state) f) =>
State((state) => (f(state), state));
Change the value getter based on the current state S
.
State<S, A> gets(A Function(S state) f) =>
State((state) => (f(state), state));