add EitherNev alias and syntax
I'm using Vector a lot in my 2.13.7 codebase since it's one of the best collections right now and we either need to have those aliases in the business code or convert to List/Chanin in order to use cats' syntax. After asking if it exists somewhere @armanbilge said we can add it to cats.
CI doesn't seem to be running 🤔
Looks like CI finished 🙌
Added both add IorNev and ValidatedNev
actually... I wonder if we are moving in the wrong direction here.
Like, what if instead we did:
def toValidatedA[F[_]: Applicative](e: Either[A, B]): Validated[F[A], B] =
e match {
case Right(b) => Validated.valid(b)
case Left(a) => Validated.invalid(Applicative[F].pure(a))
}
then add a low priority typeclass instance for Applicative[Validated[F[A], *]] given a SemigroupK[F].
Then all these instances would be the same.
Sure, writing that boilerplate was kinda annoying, especially trying to find all existing ones and make them consistent. I can prepare another MR or add to the existing one. What do you prefer?
@key-eugene are you still interested to work on Oscar's proposal? Seems like an interesting idea, I guess a separate PR would make more sense.
Yeah, I like that idea too. Seems similar to the discussion we have around generalization of group-alike methods in other PRs – instead of hardcoding output types we could try to elaborate on making them more generic.
@armanbilge yep! Should I close this one or we can merge it and I will work from there?
made another PR with proposed changes #4336