title: Haskell Lists within lists
body: <p>I've a homework question where I have to Define a function which with an input in the form of a list with smaller lists of integers it and sums the numbers in each of the innermost lists and then multiplies the resulting sums with each other. </p>
  
  <p>My code is as follows and obviously doesn't work, any help will be greatly appreciated :)</p>
  
  <pre><code>sumI :: [Int] -&gt; Int
  sumI [] = 0
  sumI (x:xs) = x + sumI xs
  
  mapQ :: [[Int]] -&gt; Int
  mapQ [] = []
  mapQ xs = [product (sumI x) | x &lt;- xs]
  </code></pre>