Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the form-fiddle Reference Manual, version 1.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 04:33:41 2022 GMT+0.
Next: Systems, Previous: The form-fiddle Reference Manual, Up: The form-fiddle Reference Manual [Contents][Index]
Often times I need to destructure a form definition in a macro. This is a set of simple utilities to help with that.
There's individual functions to extract each part of a lambda-definition-form: function, name, qualifiers, lambda-list, body, declarations, docstring and the forms. You can get all in one with split-lambda-form
, or directly as a binding macro with with-destructured-lambda-form
.
(split-lambda-form '(defun lambda-body (lambda-form)
(cddr lambda-form)))
(with-destructured-lambda-form (:forms forms)
'(defmacro foo (bar)
(declare (ignore bar))
"Testing macro!"
(print "test!"))
forms)
Next: Files, Previous: Introduction, Up: The form-fiddle Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
A collection of utilities to destructure lambda forms.
Nicolas Hafner <shinmera@tymoon.eu>
Nicolas Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shinmera/form-fiddle.git)
zlib
1.1.0
documentation-utils (system).
Next: Packages, Previous: Systems, Up: The form-fiddle Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: form-fiddle/package.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
form-fiddle (system).
Next: form-fiddle/form-fiddle.lisp, Previous: form-fiddle/form-fiddle.asd, Up: Lisp [Contents][Index]
form-fiddle (system).
Next: form-fiddle/documentation.lisp, Previous: form-fiddle/package.lisp, Up: Lisp [Contents][Index]
package.lisp (file).
form-fiddle (system).
Previous: form-fiddle/form-fiddle.lisp, Up: Lisp [Contents][Index]
form-fiddle.lisp (file).
form-fiddle (system).
Next: Definitions, Previous: Files, Up: The form-fiddle Reference Manual [Contents][Index]
Packages are listed by definition order.
org.shirakumo.form-fiddle
common-lisp.
Next: Indexes, Previous: Packages, Up: The form-fiddle Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Public Interface, Up: Public Interface [Contents][Index]
Destructures the body according to split-body-kargs.
OTHER-OPTIONS will be bound to contain all the options that occur in the body but were not explicitly requested in OPTIONS. BODY will be bound to the remaining body forms. Each option in OPTIONS can be either a symbol or a list of symbol and default. The symbol is automatically converted to a keyword to match against the body options.
Destructures the given EXPRESSION into its lambda-form parts.
Previous: Macros, Up: Public Interface [Contents][Index]
Returns all BODY forms of the lambda-form.
|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯v¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯| (function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)
Returns the DECLARATIONS of the lambda-form, if any.
v
(function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)
Returns the DOCSTRING of the lambda-form, if any.
v
(function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)
Returns the actual body forms of the lambda-form, if any.
v (function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)
Returns the defining FUNCTION of the lambda-form.
v
(function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)
Returns the LAMBDA-LIST of the lambda-form.
v
(function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)
Returns the NAME of the lambda-form, if any.
v
(function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)
Returns the QUALIFIERS of the lambda-form.
v
(function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)
Parses the body into two separate lists of forms and options.
This is found in some expressions like in the clause body of RESTART-CASE.
BODY ::= OPTION* FORM*
OPTION ::= KEYWORD EXPRESSION
Returns all parts of a lambda-form as a list in the following order: FUNCTION NAME QUALIFIERS LAMBDA-LIST DOCSTRING DECLARATIONS FORMS
Previous: Public Interface, Up: Definitions [Contents][Index]
Previous: Definitions, Up: The form-fiddle Reference Manual [Contents][Index]
Jump to: | D F L M R S W |
---|
Jump to: | D F L M R S W |
---|
Jump to: | D F P S |
---|
Jump to: | D F P S |
---|