Macros: The Building Blocks

Learn to build custom language features using macros.

Recreating Elixir’s unless macro

Suppose that Elixir lacks a built-in unless construct. In most languages, we would have to settle for if! expressions and learn to accept this syntactic shortcoming. Fortunately for us, Elixir isn’t like most languages.

Get hands-on with 1200+ tech skills courses.