gets<S, A> function

State<S, A> gets<S, A>(
  1. A f(
    1. S s
    )
)

Get a value that depends on the state

Implementation

State<S, A> gets<S, A>(A Function(S s) f) => State((s) => tuple2(f(s), s));