title: How to output a single [Int] from this function?
body: <pre><code>import Data.Char
  
  type Games = (String, String, Int)
  
  test :: [Games]
  test =
      [
      ("Minecraft","mojang",100),
      ("GTA V","rockstar",500),
      ("Portal","valve",200),
      ("GTA IV","rockstar",100)
      ]
  
  -- give the total number of sales for a studio
  studioSales :: String -&gt; [Games] -&gt; [Int]
  studioSales studioName [] = []
  studioSales studioName ((name,studio,quantitySold):xs)
     | studioName == studio = quantitySold: studioSales studioName xs 
     | otherwise = studioSales studioName xs
  </code></pre>
  
  <p>When the function " studioSales "rockstar" test " is called the value returned is "[500,100]".</p>
  
  <p>How can I modify this so when " studioSales "rockstar" test " is called, the value returned is "[600]", where two of the Int's are added up.</p>
  
  <p>Also how can i add up all the sales? so a function that would return all the integers added up?</p>