arrow-core-data / arrow.core / Either / toOption
fun ~~toOption~~():
Option
<B>
Deprecated: Deprecated, use orNull
instead
Returns a Some containing the Right value if it exists or a None if this is a Left.
Example:
Right(12).toOption() // Result: Some(12)
Left(12).toOption() // Result: None
Do you like Arrow?
✖