How to sequence Either with Scala cats without a type alias (see Herding cats)
I was reading Herding Cats The final example on the Traverse page on sequencing List of Either failed for me. in the example they do this:- scala> List(Right(1): Either[String, Int]).sequence res5: Either[String,List[Int]] = Right(List(1)) scala> List(Right(1): Either[String, Int], Left("boom"): Either[String, Int]).sequence res6: Either[String,List[Int]] = Left(boom) But When I try I get the following error:- scala> import cats._, cats.data._, cats.implicits._ scala> val les = List(Right(3):Either[String,Int], Right(2):Either[String,Int]) scala> les.sequence <console>:37: error: Cannot prove