toEither

fun toEither(): Either<A, B>

Returns a Either.Right containing the Right value or B if this is Right or Both and Either.Left if this is a Left.

Example:

import arrow.core.Ior

fun main() {
Ior.Right(12).toEither() // Result: Either.Right(12)
Ior.Left(12).toEither() // Result: Either.Left(12)
Ior.Both("power", 12).toEither() // Result: Either.Right(12)
}