title: Clojure: pre post functions
body: <h2>Context</h2>
  
  <p>I'm aware of <a href="http://blog.fogus.me/2009/12/21/clojures-pre-and-post/" rel="noreferrer">http://blog.fogus.me/2009/12/21/clojures-pre-and-post/</a></p>
  
  <p>What I want is not exactly pre/post conditions.</p>
  
  <p>I want to have pre/post <em>functions</em> that are executed <em>exactly</em> once.</p>
  
  <p>I don't see any documentation promising me this feature about the pre/post conditions (i.e. that they're not executed multiple times.)</p>
  
  <h2>Question</h2>
  
  <p>For a Clojure function, is there anyway to tag it with pre/post <em>functions</em> that are executed exactly once,</p>
  
  <ul>
  <li>the pre function when the function is called</li>
  <li>the post function when the function returns</li>
  </ul>
  
  <p>Thanks!</p>