(defmacro swap-order [a b] ~(let [tmp# ,a] [,b tmp#])) (= (macroexpand `(swap-order x 2)) (macroexpand `(swap-order x 2))) (str (macroexpand `(swap-order x 2))) (let [text (str (fn [] [(swap-order a 1) (swap-order b 2)]))] [(strings/includes? text "tmp__1") (strings/includes? text "tmp__2") (strings/includes? text "tmp__3")])