bind

inline fun <L, R> AsyncResult<Either<L, R>>.bind(): AsyncResult<R>

Based on the either values inside of the AsyncResult, convert it to a Success value if the Either was Either.Right, and a Error value if the Either was Either.Left. It will store the Either.Left contents, if any, in the Error.metadata value.


@JvmName(name = "bindWithLeftThrowable")
inline fun <R> AsyncResult<Either<Throwable, R>>.bind(): AsyncResult<R>

Based on the either values (Throwable at the left side, R at the right side) inside of the AsyncResult, convert it to a Success value if the Either was Either.Right, and a Error value if the Either was Either.Left while also storing the Throwable in the error in the Error.throwable property.