title: More explanation on Lexical Binding in Closures?
body: <p><strong>There are many SO posts related to this, but I am asking this again with a different purpose</strong></p>
  
  <p>I am trying to understand why closures are important and useful. One of things that I've read in other SO posts related to this is that when you pass a variable to closure, the closure starts remembering this value from then onwards. Is this the entire Technical aspect of it or there is more to what happens there.</p>
  
  <p>What I wonder then is what would happen when the variable used inside the closure gets modified from outside. Should they be constants only?</p>
  
  <p>In the language Clojure, I can do the following: But since there are value is immutable, this issue does not arise. What about other languages and what is the proper technical definition of a closure?</p>
  
  <pre><code>(defn make-greeter [greeting-prefix]
      (fn [username] (str greeting-prefix ", " username)))
  
  ((make-greeter "Hello") "World")
  </code></pre>