The book "Let over Lambda" by Doug Hoyte describes a fast sorting function for fixed sized inputs via sorting networks:
(defmacro! sortf (comperator &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))))))
Where does the symbol 'a1' in the expressions '(car a1)' and '(cadr a1)' come from?
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 sorting network using Batcher's algorithm.