isBoth

@JvmName(name = "_isBoth")
fun isBoth(): Boolean(source)


inline fun isBoth(leftPredicate: (A) -> Boolean, rightPredicate: (B) -> Boolean): Boolean(source)

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

Example:

import arrow.core.Ior

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