Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Built-in Macros Catalog

LFE provides 50+ built-in macros. Key categories:

Common Lisp style:

defmodule, defun, defmacro      % Module/function definition
cond                            % Multi-branch conditional
let*, flet*, letrec*           % Binding forms
list*                          % List construction

Data structures:

defrecord                      % Record definition (generates 9+ macros)
defstruct                      % Struct definition (generates functions)

Pattern matching:

match-spec                     % ETS/trace match specification DSL

Comprehensions:

lc                            % List comprehension
bc                            % Binary comprehension
qlc                           % Query list comprehension

Convenience:

c*r macros                    % car, cdr, caar, cadr, cddr, etc.
++, !=, ===, !==             % Operator synonyms

Special:

MODULE                        % Current module name (compile-time constant)
LINE                          % Current line number (compile-time constant)
:module:function             % Call syntax → (call 'module 'function ...)