arrow-core-data / arrow.core / Validated / withEither

withEither

fun <EE, B> withEither(f: (Either<E, A>) -> Either<EE, B>): Validated<EE, B>

Convert to an Either, apply a function, convert back. This is handy when you want to use the Monadic properties of the Either type.

Do you like Arrow?

Arrow Org
<