title: Haskell usnig termination in a function
body: <p>I would like to know more about termination in functions, for example: how termination work in this function when n is a natural number or how I can terminate this function</p>
  <pre><code>sum :: Int -&gt; Int
  sum 0 = 0
  sum n = n + sum (n - 1)
  </code></pre>