toResult

suspend fun <E, A> Effect<E, A>.toResult(orElse: suspend (E) -> Result<A>): Result<A>

Run the Effect by returning Result of A, orElse run the fallback lambda and returning its result of Result of A.


fun <E, A> EagerEffect<E, A>.toResult(orElse: (E) -> Result<A>): Result<A>


suspend fun <A> Effect<Throwable, A>.toResult(): Result<A>

Run the Effect by returning Result of A, or Result.Failure if raised with Throwable.