isRight

Returns true if this is a Right, false otherwise.

Example:

import arrow.core.Ior

fun main() {
Ior.Left("tulip").isRight() // Result: false
Ior.Right("venus fly-trap").isRight() // Result: true
Ior.Both("venus", "fly-trap").isRight() // Result: false
}

inline fun isRight(predicate: (B) -> Boolean): Boolean

Returns false if Left or Both, or returns the result of the application of the given predicate to the Right value.

Example:

import arrow.core.Ior

fun main() {
Ior.Right(12).isRight { it 10 } // Result: false
Ior.Both(12, 7).isRight { it 10 } // Result: false
val left: Ior<Int, Int> = Ior.Left(12)
left.isRight { it 10 } // Result: true
}