validateMap

inline fun <ERR, A, B> A.validateMap(f: (A) -> Either<Throwable, B>, error: (A, Throwable) -> ERR): ValidatedNel<ERR, B>(source)

Given a mapping function and an error message, return either the result of the function in a ValidNel if the function completes successfully, or the error message in an InvalidNel.