isLeft
Returns true
if this is a Left, false
otherwise.
Example:
import arrow.core.Ior
fun main() {
Ior.Left("tulip").isLeft() // Result: true
Ior.Right("venus fly-trap").isLeft() // Result: false
Ior.Both("venus", "fly-trap").isLeft() // Result: false
}
Content copied to clipboard
Returns false
if Right or Both, or returns the result of the application of the given predicate to the Left value.
Example:
import arrow.core.Ior
fun main() {
val right: Ior<Int, Int> = Ior.Right(12)
right.isLeft { it 10 } // Result: false
Ior.Both(12, 7).isLeft { it 10 } // Result: false
Ior.Left(12).isLeft { it 10 } // Result: true
}
Content copied to clipboard