title: Scala cats and traverse syntax for Either - doesn't compile
body: <p>I am trying to use <code>traverse</code> (or <code>sequence</code> which is pretty much the same for my task) from cats library <a href="https://typelevel.org/cats/typeclasses/traverse.html" rel="noreferrer">https://typelevel.org/cats/typeclasses/traverse.html</a> . I want to traverse a <code>List[A]</code> with function <code>A =&gt; Either[L,R]</code> to get <code>Either[L,List[R]]</code> as a result.</p>
  
  <p>Consider the following tiny example (I use scala-2.12.6, cats-core-1.3.1, sbt-1.1.2):</p>
  
  <pre><code>import cats.implicits._
  
  def isOdd(i: Int): Either[String, Int] = 
    if (i % 2 != 0) Right(i) else Left("EVEN")
  
  val odd: Either[String, List[Int]] = (1 to 10).toList.traverse(isOdd)
  </code></pre>
  
  <p>It doesn't compile, it gives:</p>
  
  <pre><code>no type parameters for method traverse: (f: Int =&gt; G[B])(implicit evidence$1: cats.Applicative[G])G[List[B]] exist so that it can be applied to arguments (Int =&gt; Either[String,Int])
  [error]  --- because ---
  [error] argument expression's type is not compatible with formal parameter type;
  [error]  found   : Int =&gt; Either[String,Int]
  [error]  required: Int =&gt; ?G[?B]
  [error]     val odd: Either[String, List[Int]] = (1 to 10).toList.traverse(isOdd)
  
  type mismatch;
  [error]  found   : Int =&gt; Either[String,Int]
  [error]  required: Int =&gt; G[B]
  [error]     val odd: Either[String, List[Int]] = (1 to 10).toList.traverse(isOdd)
  [error]                                                                   ^
  
  could not find implicit value for evidence parameter of type cats.Applicative[G]
  [error]     val odd: Either[String, List[Int]] = (1 to 10).toList.traverse(isOdd)
  [error]                                                                   ^
  </code></pre>