Macro-expand - show code generated by macrosλ︎
There are around 50 macros in
clojure.core and to understand what they are doing it is useful to expand the macro into the code that it generates. Expanding a macro shows you the code generated by the macro reader. Code from the macro is displayed in a new buffer.
. e m expands a macro once, the most simple and commonly used command (
, e M expands until there are no more macros. Less often there will be layers of macros in the expression, so this will show the code from complete resolution of all macros in the expression (
In this example we expand a simple