exists

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

Deprecated

This API is niche and will be removed in the future. If this method is crucial for you, please let us know on the Arrow Github. Thanks! https://github.com/arrow-kt/arrow/issues Prefer isRight

Replace with

isRight(predicate)

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

Example:

import arrow.core.Either
import arrow.core.Either.Left

fun main() {
Either.Right(12).exists { it 10 } // Result: true
Either.Right(7).exists { it 10 } // Result: false

val left: Either<Int, Int> = Left(12)
left.exists { it 10 } // Result: false
}