title: How to call .map() on a list of pairs in Scala
body: <p>I want to call <code>map()</code> on a list of pairs, but I get a type mismatch error.</p>
  
  <p>For example, suppose I want to map a List of pairs of Int to a list of their sums:</p>
  
  <pre><code>scala&gt; val ll=List((1,2),(3,4),(5,6))
  ll: List[(Int, Int)] = List((1,2), (3,4), (5,6))
  
  scala&gt; ll.map((x:Int,y:Int)=&gt;x+y)
  &lt;console&gt;:9: error: type mismatch;
   found   : (Int, Int) =&gt; Int
   required: ((Int, Int)) =&gt; ?
                ll.map((x:Int,y:Int)=&gt;x+y)
                                    ^
  </code></pre>
  
  <p>By the way, when trying to run foreach() I get a very similar error:</p>
  
  <pre><code>scala&gt; ll.foreach((x:Int,y:Int)=&gt;println(x,y))
  &lt;console&gt;:9: error: type mismatch;
   found   : (Int, Int) =&gt; Unit
   required: ((Int, Int)) =&gt; ?
                ll.foreach((x:Int,y:Int)=&gt;println(x,y))
                                    ^
  </code></pre>
  
  <p>What does the <code>?</code> sign stand for? What am I missing here?</p>