arrow-core-data / arrow.core / Validated / fromOption

fromOption

@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.

Do you like Arrow?

Arrow Org
<