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
}

inline fun isLeft(predicate: (A) -> Boolean): Boolean

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
}