title: Evaluate an if expression and then return the same evaluation if false in Clojure
body: <p>I want to evaluate a from in if binding of clojure and if it returns false then i want to return the evaluation.</p>
  
  <p>For eg</p>
  
  <pre><code>(defn testa [testvalue](let [tval testvalue]
                      (assert (validate tval) "incorrectvalue")
                      (if (= (+ 4 tval) 8)
                        1
                        (+ 4 tval))))
  </code></pre>
  
  <p>So here validate is a function which validates some criteria but after that if expression results in false then i am returning  the same result of the same expression i evaulated in if binding.But i want to avoid it writing again.</p>
  
  <p>How can i do that?</p>
  
  <p>Correction:- i also want to perform operation on tval before validate. </p>
  
  <pre><code>(defn testa [testvalue]
  (let [tval (trim testvalue)] 
  (assert (validate tval) "incorrectvalue") 
  (if (= (+ 4 tval) 8) 
  1 
  (+ 4 tval))))
  </code></pre>
  
  <p>Thanks!!</p>