Common Lisp-inspired macros
Define a top-level function:
(defun name (arg ...) ...)
Define a toplevel function with pattern-matching arguments; this will expand to lambda or match-lambda depending on structure:
(defun name
((argpat ...) ...)
...)
Define a top-level macro:
(defmacro name (arg ...) ...)
(defmacro name arg ...)
Define a top-level macro with pattern-matching arguments; this will expand to lambda or match-lambda depending on structure:
(defmacro name
((argpat ...) ...)
...)
Define a top-level macro using Scheme inspired syntax-rules format.
(defsyntax name
(pat exp)
...)
Define local macros in macro or syntax-rule format:
(macrolet ((name (arg ...) ...)
...)
...)
(syntaxlet ((name (pat exp) ...)
...)
...)
Like their CL counterparts:
(prog1 ...)
(prog2 ...)
Define an Erlang LFE module:
(defmodule name ...)
Define an Erlang LFE record:
(defrecord name ...)