withEither

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

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