title: How is assert used?
body: <p>I'm having trouble understanding how to use the assert function (Control.Exception.Assert) </p>
  
  <p>I did read the documentation (<a href="http://hackage.haskell.org/package/assert-0.0.1.2/docs/Control-Exception-Assert.html" rel="noreferrer">http://hackage.haskell.org/package/assert-0.0.1.2/docs/Control-Exception-Assert.html</a>) but I still don't seem to understand how it's used. The currying really doesn't help in this case because of how unexplicit it is. Examples and explanation of what it's for would be lovely.</p>
  
  <p>(For context, I am trying to figure out how to use assert in this code to make sure n is always non-negative) [No answers please, I'd like to figure it out on my own]</p>
  
  <pre><code>power :: Int -&gt; Int -&gt; Int
  power x n =
    if n == 0 then
      1
    else
      x * power x (n - 1)
  </code></pre>