title: Where is 'a1' bound in sortf from the book Let over Lambda?
body: <p>The book "Let over Lambda" by Doug Hoyte describes a fast sorting function for fixed sized inputs via <a href="https://en.wikipedia.org/wiki/Sorting_network" rel="nofollow noreferrer">sorting networks</a>:</p>
  
  <pre><code>(defmacro! sortf (comperator &amp;rest places)
    (if places
      `(tagbody
        ,@(mapcar
          #`(let ((,g!a #1=,(nth (car a1) places))
                  (,g!b #2=,(nth (cadr a1) places)))
              (if (,comperator ,g!b ,g!a)
                (setf #1# ,g!b
                      #2# ,g!a)))
          (build-batcher-sn (length places))))))
  </code></pre>
  
  <p>Where does the symbol 'a1' in the expressions '(car a1)' and '(cadr a1)' come from?</p>
  
  <p>Btw. 'defmacro!' is a macro to define macros that introduces 'g!{symbol}' syntax to create a fresh symbol via 'gensym'.  And 'build-batcher-sn' builds a <a href="https://en.wikipedia.org/wiki/Sorting_network" rel="nofollow noreferrer">sorting network</a> using <a href="https://en.wikipedia.org/wiki/Batcher_odd%E2%80%93even_mergesort" rel="nofollow noreferrer">Batcher's algorithm</a>.</p>