toEither

fun <L, R> Result<R, L>.toEither(): Either<L, R>

Deprecated

This API will be made internal in the next major release.

Converts Result to Either. Result.Failure will be converted to Either.Left and Result.Success will be converted to Either.Right.