title: Scala map method syntax
body: <p>The code below from <a href="http://www.scalaclass.com/book/export/html/1" rel="noreferrer">http://www.scalaclass.com/book/export/html/1</a> to do matrix dot product.</p>
  
  <p>I can't understand the syntax between the curly brackets.</p>
  
  <ul>
  <li>Why are the curly brackets used, not the regular method parentheses? </li>
  <li>Is t an anonymous method?</li>
  <li>What is ._1 and ._2?</li>
  </ul>
  
  <p>Thanks.    </p>
  
  <pre><code>type Row    = List[Double]
  type Matrix = List[Row]
  
  def dotProd(v1:Row, v2:Row) = 
      v1.zip(v2).map{ t:(Double, Double) =&gt; t._1 * t._2 }.reduceLeft(_ + _)
  </code></pre>