//arrow-core/arrow.core/Validated/Companion
common object Companion
Name | Summary |
---|---|
catch | common @JvmStatic @JvmName(name = “tryCatch”) inline fun <A> catch(f: () -> A): Validated<Throwable, A> @JvmStatic @JvmName(name = “tryCatch”) inline fun <E, A> catch(recover: (Throwable) -> E, f: () -> A): Validated<E, A> |
catchNel | common @JvmStatic inline fun <A> catchNel(f: () -> A): ValidatedNel<Throwable, A> |
fromEither | common @JvmStatic fun <E, A> fromEither(e: Either<E, A>): Validated<E, A> Converts an Either<E, A> to a Validated<E, A> . |
fromNullable | common @JvmStatic inline fun <E, A> fromNullable(value: A?, ifNull: () -> E): Validated<E, A> Converts a nullable A? to a Validated<E, A> , where the provided ifNull output value is returned as Invalid when the specified value is null. |
fromOption | common @JvmStatic inline fun <E, A> fromOption(o: Option<A>, ifNone: () -> E): Validated<E, A> Converts an Option<A> to a Validated<E, A> , where the provided ifNone output value is returned as Invalid when the specified Option is None . |
invalidNel | common @JvmStatic fun <E, A> invalidNel(e: E): ValidatedNel<E, A> |
lift | common @JvmStatic inline fun <E, A, B> lift(crossinline f: (A) -> B): (Validated<E, A>) -> Validated<E, B> common @JvmStatic inline fun <A, B, C, D> lift(crossinline fl: (A) -> C, crossinline fr: (B) -> D): (Validated<A, B>) -> Validated<C, D> Lifts two functions to the Bifunctor type. |
validNel | common @JvmStatic fun <E, A> validNel(a: A): ValidatedNel<E, A> |
Do you like Arrow?
✖