ap

open override fun <B> ap(function: Effect<(A) -> B>): IO<B>

Applies a function contained in another Effect to the value of this IO.

Return

A new IO containing the result of applying the function to the value.

Parameters

function

An Effect containing a function that transforms a value of type A to type B.