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

fromOption

fun <E, A> fromOption(o: Option<A>, ifNone: () -> E): Validated<E, A>

Converts an Option<B> to an Validated<A, B>, where the provided ifNone values is returned on the invalid of the Validated when the specified Option is None.

Do you like Arrow?

Arrow Org
<