title: How to check if types are Tuple in compile time
body: <p>I have the following case class:</p>
  
  <pre><code>case class MyClass[A,B](a:A, b:B)
  </code></pre>
  
  <p>I want to add a function like unzip to <code>MyClass</code> so if <code>A</code> and <code>B</code> are Tuple types then I want to extract them like the following:</p>
  
  <pre><code>val item = MyClass[(Int,String), (Int,String)]((2,"two"), (3,"three"))
  val item_left = MyClass(item.a._1, item.b._1)
  val item_right = MyClass(item.a._2, item.b._2)
  </code></pre>
  
  <p>How should I do that and check the type for tuple in compile time? I don't want to define it in the companion object and I want it to be a function in <code>MyClass</code>. I know that I can define an <code>implicit</code> function but is it the only way?</p>