The let-plus Reference Manual

This is the let-plus Reference Manual, version 0.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:36:10 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 let-plus

Destructuring extension of LET*.

Maintainer

Sharp Lispers <>

Author

Tamas K. Papp <>

License

Boost Software License - Version 1.0

Version

0.2

Dependencies
  • alexandria (system).
  • anaphora (system).
Source

let-plus.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 let-plus/let-plus.asd

Source

let-plus.asd.

Parent Component

let-plus (system).

ASDF Systems

let-plus.


3.1.2 let-plus/package.lisp

Source

let-plus.asd.

Parent Component

let-plus (system).

Packages

let-plus.


3.1.3 let-plus/let-plus.lisp

Dependency

package.lisp (file).

Source

let-plus.asd.

Parent Component

let-plus (system).

Public Interface
Internals

3.1.4 let-plus/extensions.lisp

Dependency

let-plus.lisp (file).

Source

let-plus.asd.

Parent Component

let-plus (system).

Public Interface
Internals

destructured-lambda-list-forms (function).


4 Packages

Packages are listed by definition order.


4.1 let-plus

Source

package.lisp.

Use List
  • alexandria.
  • anaphora.
  • common-lisp.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: &accessors (&rest accessors)

LET+ form, similar to WITH-ACCESSORS.

Package

let-plus.

Source

let-plus.lisp.

Macro: &accessors-r/o (&rest accessors)

LET+ form, similar to WITH-ACCESSORS, but read-only.

Package

let-plus.

Source

let-plus.lisp.

Macro: &array-elements (&rest array-elements)

LET+ form, mapping (variable &rest subscripts) specifications to array-elements. VARIABLE is an accessor, which can be used for reading and writing array elements.

Package

let-plus.

Source

let-plus.lisp.

Macro: &array-elements-r/o (&rest array-elements)

LET+ form, mapping (variable &rest subscripts) specifications to array-elements. Read-only accessor, values assigned to VARIABLEs.

Package

let-plus.

Source

let-plus.lisp.

Macro: &complex (x y)

Access real and imaginary part of the value. Read-only.

Package

let-plus.

Source

extensions.lisp.

Macro: &flet (function-name lambda-list &body function-body)

LET+ form for function definitions. Expands into an FLET.

Package

let-plus.

Source

let-plus.lisp.

Macro: &flet+ (function-name lambda-list &body function-body)

&FLET that destructures its arguments using LET+.

Package

let-plus.

Source

extensions.lisp.

Macro: &fwrap (name)

Wrap closure in the local function NAME. Calls to NAME will call the closure.

Package

let-plus.

Source

extensions.lisp.

Macro: &hash-table (&rest entries)

LET+ form for hash tables. Each entry is (variable &optional key default).

Package

let-plus.

Source

let-plus.lisp.

Macro: &hash-table-r/o (&rest entries)

LET+ form for hash tables. Each entry is (variable &optional key default). Read only version.

Package

let-plus.

Source

let-plus.lisp.

Macro: &labels (function-name lambda-list &body function-body)

LET+ form for function definitions. Expands into an LABELS, thus allowing recursive functions.

Package

let-plus.

Source

let-plus.lisp.

Macro: &labels+ (function-name lambda-list &body function-body)

&LABELS that destructures its arguments using LET+.

Package

let-plus.

Source

extensions.lisp.

Macro: &macrolet (macro-name lambda-list &body macro-body)

LET+ form for local macro definitions. Expands into an MACROLET.

Package

let-plus.

Source

let-plus.lisp.

Macro: &once-only (&rest specs)

Expand to (ONCE-ONLY SPECS ...).

Package

let-plus.

Source

extensions.lisp.

Macro: &plist (&rest entries)

LET+ form for property lists. Each entry is (variable &optional key default).

Package

let-plus.

Source

let-plus.lisp.

Macro: &plist-r/o (&rest entries)

LET+ form for property lists, read only version. Each entry is (variable &optional key default).

Package

let-plus.

Source

let-plus.lisp.

Macro: &slots (&rest slots)

LET+ form, similar to WITH-SLOTS.

Package

let-plus.

Source

let-plus.lisp.

Macro: &slots-r/o (&rest slots)

LET+ form, similar to WITH-SLOTS but read-only.

Package

let-plus.

Source

let-plus.lisp.

Macro: &structure (conc-name &rest slots)

LET+ form for slots of a structure, with accessors generated using CONC-NAME.

Package

let-plus.

Source

let-plus.lisp.

Macro: &structure-r/o (conc-name &rest slots)

LET+ form for slots of a structure, with accessors generated using CONC-NAME. Read-only version.

Package

let-plus.

Source

let-plus.lisp.

Macro: &symbol-macrolet (symbol expansion)

LET+ form for local symbol macros. Expands into a SYMBOL-MACROLET.

Package

let-plus.

Source

let-plus.lisp.

Macro: &values (&rest values)

LET+ form for multiple values.

Package

let-plus.

Source

let-plus.lisp.

Macro: &with-gensyms (&rest names)

Expand to (WITH-GENSYMS NAMES ...).

Package

let-plus.

Source

extensions.lisp.

Macro: define-let+-expansion ((name arguments &key value-var body-var uses-value? once-only?) &body body)

Define an expansion for LET+ forms which are lists, starting with NAME. ARGUMENTS is destructured if a list. A placeholder macro is defined with NAME, using DOCSTRING and ARGUMENTS. The value form is bound to VALUE-VAR (wrapped in ONCE-ONLY when ONCE-ONLY?), while the body is bound to BODY-VAR. USES-VALUE? determines if the form uses a value, and generates the appropriate checks.

Package

let-plus.

Source

let-plus.lisp.

Macro: define-structure-let+ ((name &key conc-name r/w r/o) &rest slot-names)

Define a LET+ expansion for accessing slots of a structure in a fixed order.

Package

let-plus.

Source

extensions.lisp.

Macro: defun+ (name lambda-list &body body)

DEFUN that destructures its arguments using LET+.

Package

let-plus.

Source

extensions.lisp.

Macro: lambda+ (lambda-list &body body)

LAMBDA that destructures its arguments using LET+.

Package

let-plus.

Source

extensions.lisp.

Macro: let+ (bindings &body body)

Destructuring bindings. See the documentation of the LET-PLUS library. Most accepted forms start with &.

Package

let-plus.

Source

let-plus.lisp.


5.1.2 Generic functions

Generic Function: let+-expansion (form value body)

Return an expansion for a LET+ form.

Package

let-plus.

Source

let-plus.lisp.

Methods
Method: let+-expansion ((array array) value body)

LET+ expansion for mapping array elements to variables.

Method: let+-expansion (form value body)
Method: let+-expansion ((variable null) value body)
Method: let+-expansion ((variable symbol) value body)
Method: let+-expansion ((form list) value body)
Generic Function: let+-expansion-for-list (first rest value body)

LET+-EXPANSION calls this for lists, see the latter for semantics of returned values.

Package

let-plus.

Source

let-plus.lisp.

Methods
Method: let+-expansion-for-list ((first (eql let-plus:&complex)) arguments0 value body)
Source

extensions.lisp.

Method: let+-expansion-for-list ((first (eql let-plus:&with-gensyms)) arguments0 value body)
Source

extensions.lisp.

Method: let+-expansion-for-list ((first (eql let-plus:&once-only)) arguments0 value body)
Source

extensions.lisp.

Method: let+-expansion-for-list ((first (eql let-plus:&fwrap)) arguments0 value body)
Source

extensions.lisp.

Method: let+-expansion-for-list ((first (eql let-plus:&labels+)) arguments0 value body)
Source

extensions.lisp.

Method: let+-expansion-for-list ((first (eql let-plus:&flet+)) arguments0 value body)
Source

extensions.lisp.

Method: let+-expansion-for-list ((first (eql let-plus:&hash-table-r/o)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&hash-table)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&plist-r/o)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&plist)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&symbol-macrolet)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&macrolet)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&labels)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&flet)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&array-elements-r/o)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&array-elements)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&values)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&structure-r/o)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&structure)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&slots-r/o)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&slots)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&accessors-r/o)) arguments0 value body)
Method: let+-expansion-for-list ((first (eql let-plus:&accessors)) arguments0 value body)
Method: let+-expansion-for-list (first rest value body)

5.2 Internals


5.2.1 Macros

Macro: mergable-labels (bindings &body body)
Package

let-plus.

Source

let-plus.lisp.


5.2.2 Ordinary functions

Function: &-symbol? (symbol)

Test whether the symbol’s name starts with a & character.

Package

let-plus.

Source

let-plus.lisp.

Function: destructured-lambda-list-forms (lambda-list body)

Return a list that can be spliced into function definitions (eg DEFUN, LAMBDA, FLET, LABELS).

The list starts with a lambda list, and is followed by a docstring (when provided), then a LET+ form that wraps declarations (when provided) and BODY.

Used internally, not exported.

Package

let-plus.

Source

extensions.lisp.

Function: expand-array-elements (value array-elements &optional accessor)

Expand a list of (BINDING &REST SUBSCRIPTS) forms to a list of bindings of the form (ACCESSOR VALUE SUBSCRIPTS).

Package

let-plus.

Source

let-plus.lisp.

Function: expand-entry-forms (entries accessor-generator)

Return a list of expanded bindings from ENTRIES, calling (ACESSOR-GENERATOR KEY DEFAULT). Each entry is (VARIABLE &OPTIONAL KEY DEFAULT). When KEY is NIL, VARIABLE is used.

Package

let-plus.

Source

let-plus.lisp.

Function: expand-slot-forms (slots accessor-generator)

Return a list of expanded bindings, calling (ACCESSOR-GENERATOR KEY)

Package

let-plus.

Source

let-plus.lisp.

Function: ignored? (symbol)

Return a boolean determining if a variable is to be ignored.

NOTE: It is unlikely that you need to used this function, see the note above its definition.

Package

let-plus.

Source

let-plus.lisp.

Function: replace-ignored (tree)

Replace ignored variables in TREE with a gensym, return a list of these as the second value.

NOTE: It is unlikely that you need to used this function, see the note above its definition.

Package

let-plus.

Source

let-plus.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   &  
D   E   F   G   I   L   M   R  
Index Entry  Section

&
&-symbol?: Private ordinary functions
&accessors: Public macros
&accessors-r/o: Public macros
&array-elements: Public macros
&array-elements-r/o: Public macros
&complex: Public macros
&flet: Public macros
&flet+: Public macros
&fwrap: Public macros
&hash-table: Public macros
&hash-table-r/o: Public macros
&labels: Public macros
&labels+: Public macros
&macrolet: Public macros
&once-only: Public macros
&plist: Public macros
&plist-r/o: Public macros
&slots: Public macros
&slots-r/o: Public macros
&structure: Public macros
&structure-r/o: Public macros
&symbol-macrolet: Public macros
&values: Public macros
&with-gensyms: Public macros

D
define-let+-expansion: Public macros
define-structure-let+: Public macros
defun+: Public macros
destructured-lambda-list-forms: Private ordinary functions

E
expand-array-elements: Private ordinary functions
expand-entry-forms: Private ordinary functions
expand-slot-forms: Private ordinary functions

F
Function, &-symbol?: Private ordinary functions
Function, destructured-lambda-list-forms: Private ordinary functions
Function, expand-array-elements: Private ordinary functions
Function, expand-entry-forms: Private ordinary functions
Function, expand-slot-forms: Private ordinary functions
Function, ignored?: Private ordinary functions
Function, replace-ignored: Private ordinary functions

G
Generic Function, let+-expansion: Public generic functions
Generic Function, let+-expansion-for-list: Public generic functions

I
ignored?: Private ordinary functions

L
lambda+: Public macros
let+: Public macros
let+-expansion: Public generic functions
let+-expansion: Public generic functions
let+-expansion: Public generic functions
let+-expansion: Public generic functions
let+-expansion: Public generic functions
let+-expansion: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions
let+-expansion-for-list: Public generic functions

M
Macro, &accessors: Public macros
Macro, &accessors-r/o: Public macros
Macro, &array-elements: Public macros
Macro, &array-elements-r/o: Public macros
Macro, &complex: Public macros
Macro, &flet: Public macros
Macro, &flet+: Public macros
Macro, &fwrap: Public macros
Macro, &hash-table: Public macros
Macro, &hash-table-r/o: Public macros
Macro, &labels: Public macros
Macro, &labels+: Public macros
Macro, &macrolet: Public macros
Macro, &once-only: Public macros
Macro, &plist: Public macros
Macro, &plist-r/o: Public macros
Macro, &slots: Public macros
Macro, &slots-r/o: Public macros
Macro, &structure: Public macros
Macro, &structure-r/o: Public macros
Macro, &symbol-macrolet: Public macros
Macro, &values: Public macros
Macro, &with-gensyms: Public macros
Macro, define-let+-expansion: Public macros
Macro, define-structure-let+: Public macros
Macro, defun+: Public macros
Macro, lambda+: Public macros
Macro, let+: Public macros
Macro, mergable-labels: Private macros
mergable-labels: Private macros
Method, let+-expansion: Public generic functions
Method, let+-expansion: Public generic functions
Method, let+-expansion: Public generic functions
Method, let+-expansion: Public generic functions
Method, let+-expansion: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions
Method, let+-expansion-for-list: Public generic functions

R
replace-ignored: Private ordinary functions


A.3 Variables