title: Scala .zip with higher-kinded types, weird behaviour
body: <p>Following the question and answer in <a href="https://stackoverflow.com/questions/56240426/scala-methods-and-higher-kinded-type-parameters">Scala methods and higher-kinded type parameters</a> where I asked how to create a method with higher-kinded parameters so I could use any Seq, I am facing now a weird problem when using the .zip method. The code below doesn't compile, the complire reports:</p>
  
  <pre><code>Error:(18, 28) type mismatch;
   found   : Seq[X]
   required: S[X]
          itrA.zip(itrB).map {
  </code></pre>
  
  <p>I don't know where S[X] is transformed to Seq[X]. However, if I replace the code with the call to .zip with a more simple one (the commented one) which simply sums both heads of itrA and itrB and returns ItrA, the compilation is successful.</p>
  
  <p>The code is:</p>
  
  <pre><code>object SeqOps {
  
    def sum[X: Numeric, S[Y] &lt;: Seq[Y]](s: Seq[S[X]])
      (implicit cbf: CanBuildFrom[Nothing, X, S[X]]): Seq[X] =
  
    /*
        This code compiles
         s.reduce{(itrA, itrB) =&gt;
            val num = implicitly[Numeric[X]]
            val sum = new num.Ops(itrA.head).+(itrB.head)
            itrA
            */
  
        s.reduce{(itrA, itrB) =&gt;
          itrA.zip(itrB).map { // it seems that itrB loses the type here :/
            case (a, b) =&gt;
              val num = implicitly[Numeric[X]]
              val sum = new num.Ops(a).+(b)
              sum
        }
  
    }
  
    def main(args: Array[String]): Unit = {
      sum(Seq(Vector(1), Vector(1)))
    }
  
  }
  </code></pre>
  
  <p>The questions are: Why is this happening? How can I fix it?</p>