arrow-core-data / arrow.core / kotlin.Any / rightIfNull

rightIfNull

fun <A> Any?.rightIfNull(default: () -> A): Either<A, Nothing?>

Returns Either.Right if the value of type Any? is null, otherwise the specified A value wrapped into an Either.Left.

Do you like Arrow?

Arrow Org
<