I have a function with the following signature

def reject[A](errors: List[String]): ValidationNEL[String, A]

Since this is a reject method, the type A would never be returned but I need it to be reflected in order to match the signature. I was messing around with type lambdas to get my desired result as follows:

errors.map(Failure[String, A](_).liftFailNel).sequence[({type l[a] = ValidationNEL[String, a]})#l, A]

This uses the type List[A] (or appears to), rather than my desired type A. Is there a standard way to derive the result I am looking for?

Edit
Report