title: How to check whether a value is fall into a range or not in clojure
body: <p>The range could be defined by maxInclude, maxExclude,minInclude,minExclude</p>
  
  <pre><code>(defn check-range [value maxInclude maxExclude minInclude minExclude] ...)
  </code></pre>
  
  <p>And the following should hold true.</p>
  
  <pre><code>(check-range 100 100 nil nil 10) ;; should return true since 100&lt;=100 and 100&gt;10
  (check-range 100 nil 200 nil 10) ;; should return true since 100&lt;200 and 100&gt;10
  (check-range 100 100 nil 101 nil) ;; should return false since 100&lt;=101 is not true
  </code></pre>
  
  <p>Is there any simple solution? I am using a long code which looks like imperative solution. I think in clojure there must be some nice solutions. </p>
  
  <p>update: my code is as below, but not complete and need help to complete it</p>
  
  <pre><code>(defn check-range [value maxInclude maxExclude minInclude minExclude]
    ( 
     let [value1 (if (and maxInclude (&lt; value maxInclude)) false true)
                 value2 (if (and maxExclude (&lt;=  value maxExclude)) false true)
                 value3 (if (and minInclude (&gt; value minInclude)) false true)
                 value4 (if (and minExclude (&gt;=  value minExclude)) false true)
                 ]
           ;;; then how to combine value1,2,3,4 into final result as false or true.
       )
      )
    )
  </code></pre>