//arrow-core/arrow.core/Option/Companion

Companion

common object Companion

Functions

Name Summary
catch common
@JvmStatic
@JvmName(name = “tryCatchOrNone”)
inline fun <A> catch(f: () -> A): Option<A>
Ignores exceptions and returns None if one is thrown
common
@JvmStatic
@JvmName(name = “tryCatch”)
inline fun <A> catch(recover: (Throwable) -> Option<A>, f: () -> A): Option<A>
fromNullable common
@JvmStatic
fun <A> fromNullable(a: A?): Option<A>
invoke common
@JvmStatic
operator fun <A> invoke(a: A): Option<A>
lift common
@JvmStatic
fun <A, B> lift(f: (A) -> B): (Option<A>) -> Option<B>

Do you like Arrow?

Arrow Org
<