ap

abstract fun <B> ap(function: Effect<(A) -> B>): Effect<B>

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

Return

A new Effect 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.