isRight



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

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

import arrow.core.Either
import arrow.core.Either.Left
import arrow.core.Either.Right
import io.kotest.matchers.shouldBe

fun test() {
Right(12).isRight { it 10 } shouldBe true
Right(7).isRight { it 10 } shouldBe false

val left: Either<String, Int> = Left("Hello World")
left.isRight { it 10 } shouldBe false
}