orNull

fun <B> Either<*, B>.orNull(): B?

Returns the value from this Right or null if this is a Left.

Example:

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

fun main() {
Right(12).orNull() // Result: 12
Left(12).orNull() // Result: null
}

fun <E, A> Validated<E, A>.orNull(): A?

Return the Valid value, or null if Invalid