Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate orNull Either extension function #2773

Merged
merged 9 commits into from Aug 3, 2022
Expand Up @@ -1277,8 +1277,9 @@ public inline fun <B> Either<*, B>.getOrElse(default: () -> B): B =
* ```
* <!--- KNIT example-either-46.kt -->
*/
@Deprecated("Duplicated API. Please use Either's member function orNull. This will be removed towards Arrow 2.0", ReplaceWith("orNull()"))
public fun <B> Either<*, B>.orNull(): B? =
getOrElse { null }
orNull()

/**
* Returns the value from this [Right] or allows clients to transform [Left] to [Right] while providing access to
Expand Down