toEither

fun <L, R> Result<R, L>.toEither(): <Error class: unknown class><L, R>

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