title: Basic summation in Haskell
body: <p>I'm practicing Haskell, and writing a summation function that takes in two numbers (upper and lower limits) and does the summation.</p>
  
  <p>ie, <code>summation 0 10</code> would return 55</p>
  
  <p>I can get it mostly working, but having trouble figuring out how to get it using only two parameters.</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>summation :: Integer -&gt; Integer -&gt; Integer -&gt; Integer
  summation x y sum =
      if (y&lt;x) then
          sum
      else
          summation x (y-1) (sum+y)
  </code></pre>
  
  <p>So this works fine, but I need to do <code>summation 0 10 0</code> to get it working properly. I'm not sure how I can get this working with only two parameters in Haskell.</p>