title: I need to do a subtraction in Haskell
body: <p>i need to do a subtraction in haskell, and the result add an list, but the new list doesn't give me the real valors</p>
  <p>for example: [1,2,3,4,5]</p>
  <ul>
  <li><p>prom = (1 + 2 + 3 + 4 + 5) / 5 = 3</p>
  </li>
  <li><p>subs = (1 - 3) = -2 add to list</p>
  </li>
  <li><p>subs = (2 - 3) = -1 add to list</p>
  </li>
  <li><p>subs = (3 - 3) = 0 add to list</p>
  </li>
  <li><p>subs = (4 - 3) = 1 add to list</p>
  </li>
  <li><p>subs = (5 - 3) = 2 add to list</p>
  </li>
  <li><p>new list = [-2,-1,0,1,2]</p>
  </li>
  </ul>
  <p>this's the code:</p>
  <pre><code>add (x:xs) = x + add xs
  
  prom (x:xs) = add (x:xs) `div` length (x:xs)
  
  subs [] = []
  subs (x:xs) = x - prom (x:xs) : subs xs
  </code></pre>
  <p>how i can do that? and why the results is different?</p>