title: Pattern matching functions in Clojure?
body: <p>I have used erlang in the past and it has some really useful things like pattern matching functions or "function guards". Example from erlang docs is:</p>
  
  <pre><code>fact(N) when N&gt;0 -&gt; 
      N * fact(N-1); 
  fact(0) -&gt;      
      1.    
  </code></pre>
  
  <p>But this could be expanded to a much more complex example where the form of parameter and values inside it are matched.</p>
  
  <p>Is there anything similar in clojure?</p>