ap<C> method

  1. @override
State<S, C> ap<C>(
  1. covariant State<S, C Function(A a)> a
)
override

Apply the function contained inside a to change the value of type A to a value of type C.

Implementation

@override
State<S, C> ap<C>(covariant State<S, C Function(A a)> a) =>
    a.flatMap((f) => flatMap((v) => pure(f(v))));