ap<B> method

  1. @override
IO<B> ap<B>(
  1. covariant IO<B Function(A a)> a
)
override

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

Implementation

@override
IO<B> ap<B>(covariant IO<B Function(A a)> a) =>
    a.flatMap((f) => flatMap((v) => pure(f(v))));