or Null
Return the Valid value, or null if Invalid
Deprecated
Duplicated API. Please use Either's member function orNull. This will be removed towards Arrow 2.0
Replace with
orNull()Content copied to clipboard
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
}Content copied to clipboard