fold
suspend fun <R, A, B> Effect<R, A>.fold(error: suspend (error: Throwable) -> B, recover: suspend (raised: R) -> B, transform: suspend (value: A) -> B): B
invoke the Effect and fold the result:
This method should never be wrapped in try/catch as it will not throw any unexpected errors, it will only result in CancellationException, or fatal exceptions such as OutOfMemoryError.
suspend fun <R, A, B> Effect<R, A>.fold(recover: suspend (raised: R) -> B, transform: suspend (value: A) -> B): B
inline fun <R, A, B> EagerEffect<R, A>.fold(error: (error: Throwable) -> B, recover: (raised: R) -> B, transform: (value: A) -> B): B