flatMap

abstract fun <B> flatMap(transform: suspend (A) -> Effect<B>): IO<B>

Chains this Effect with another Effect using the provided transform function.

Return

An IO containing the result of the chained computation.

Parameters

transform

The function that takes the value of type A and produces another Effect of type B.