summarized by the following rewrite:</p>
<pre><code class="language-clojure">((fn [x] x) 42) --&gt; 42
</code></pre>
<p>What happened is that the body of the function, the occurrence <code>x</code> was replaced by the value <code>42</code>. This was a beta-reduction. Let’s take the pairing function for a more interesting example:</p>
<pre><code class="language-clojure">;; ((pair "hello") 42) 
(((fn [x] (fn [y] (fn [z] ((z x) y))))
 "hello") 42)
--&gt; ((fn [y] (fn [z] ((z 42) y)) "hello"))
--&gt; (fn [z] 