title: Aggregate list values in Scala
body: <p>Starting with a list of objects containing two parameters notional and currency, how can I aggregate the total notional per currency?</p>
  
  <p>Given:</p>
  
  <pre><code>case class Trade(name: String, amount: Int, currency: String)
  
  val trades = List(
    Trade("T150310", 10000000, "GBP"),
    Trade("T150311", 10000000, "JPY"),
    Trade("T150312", 10000000, "USD"),
    Trade("T150313", 100, "JPY"),
    Trade("T150314", 1000, "GBP"),
    Trade("T150315", 10000, "USD")
  )
  </code></pre>
  
  <p>How can I get:</p>
  
  <pre><code>Map(JPY -&gt; 10000100, USD -&gt; 10010000, GBP -&gt; 10001000)
  </code></pre>