title: Binding vs Assignment
body: <p>I've read a number of articles on the difference between <code>assignment</code> and <code>binding</code>, but it hasn't clicked yet (specifically in the context of an imperative language vs one without mutation).</p>
  
  <p>I asked in IRC, and someone mentioned these 2 examples illustrate the difference, but then I had to go and I didn't see the full explanation.</p>
  
  <p>Can someone please explain how/why this works in a detailed way, to help illustrate the difference?</p>
  
  <p><strong>Ruby</strong></p>
  
  <pre><code>x = 1; f = lambda { x }; x = 2; f.call
  #=&gt; 2
  </code></pre>
  
  <p><strong>Elixir</strong></p>
  
  <pre><code>x = 1; f = fn -&gt; x end; x = 2; f.()
  #=&gt; 1
  </code></pre>