A right-biased disjunctive type with applicative functor requiring a semigroup on the left type. This is useful for composing validation functions.
Static variables
Static methods
staticinlineflatMapV<B>(this:Either<E, A>, f:A ‑> Validation<E, B>):Validation<E, B>
This is not simply flatMap because it is not consistent with ap,
as should be the case in other monads. It is equivalent to
this.either.flatMap(f).validation
staticorElseV(this:Either<E, A>, other:Validation<E, A>, s:Semigroup<E>):Validation<E, A>
If this
validation is a Right, keep it. Otherwise, try other
as an
alternative, merging their errors if both are Left.