Tinkering with macros
Despite all the meta hype, we can think about macros as normal functions that need to respect some constraints regarding their arguments and their output. Every argument passed to a macro is converted first into its quoted representation, and the value returned by a macro should also be a valid quoted representation. This is why you commonly see the last statement of a macro being a quote
block. It's also worth recalling that macros, as functions, can only be defined inside a module.
Another aspect worth mentioning is that macros are expanded before compile time. Macro expansion is the name given to the compiler process of evaluating the macro code and then replacing the call to the macro by the outcome of evaluating the macro (remember that a macro needs to return a valid quoted expression). While compiling our application, the Elixir compiler will expand a macro whenever it finds one. This expansion process is recursive because the quoted expression returned by a macro...