The easy-bind Reference Manual

This is the easy-bind Reference Manual, version 1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 05:05:34 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 easy-bind

Easy-bind - easy local binding for Common Lisp

Author

Marius Gaarde

License

MIT

Version

1.0

Source

easy-bind.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 easy-bind/easy-bind.asd

Source

easy-bind.asd.

Parent Component

easy-bind (system).

ASDF Systems

easy-bind.


3.1.2 easy-bind/easy-bind-package.lisp

Source

easy-bind.asd.

Parent Component

easy-bind (system).

Packages

edraag.easy-bind.


3.1.3 easy-bind/easy-bind-main.lisp

Dependency

easy-bind-package.lisp (file).

Source

easy-bind.asd.

Parent Component

easy-bind (system).

Public Interface
Internals

3.1.4 easy-bind/letmatch.lisp

Dependency

easy-bind-main.lisp (file).

Source

easy-bind.asd.

Parent Component

easy-bind (system).

Public Interface

letmatch (macro).

Internals

4 Packages

Packages are listed by definition order.


4.1 edraag.easy-bind

Source

easy-bind-package.lisp.

Nicknames
  • easy-bind
  • eb
Use List

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: define-binding-form (name &key left-hand-pred separator-pred form-generator)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Macro: let+ (&rest forms)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Macro: let- (&rest forms)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Macro: letfun (&rest forms)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Macro: letfun- (&rest forms)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Macro: letmacro (&rest forms)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Macro: letmatch (key-expr &body body)

Conditional form of let+ which expands into a cond form where the test-forms are calls to ‘matches’ to check if the structure of each binding-list in the body matches that of key-expr. The body should consist of pairs of binding-lists and forms separated by a fat-arrow (=>). The first binding-list that matches is bound to key-expr in a let+ form (at runtime), its right-hand form becoming the body of the let+ form.

Package

edraag.easy-bind.

Source

letmatch.lisp.

Macro: letsym (&rest forms)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Macro: letval (&rest forms)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Macro: multi-let (&rest forms)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Macro: with (&rest forms)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.


5.2 Internals


5.2.1 Ordinary functions

Function: all-keyword-p (x)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: collect-binding-list (bindings left-hand-side-predicate)

Takes a list ((a b) (c d) ...) and collects elems (x y) into new list only as long as a, c, ... satisfies predicate.

Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: collect-let+-complex-bindings (bindings)

Complex-binding-collector to be passed to generate-let*s-and-complex-bindings when generating a let+-style binding form. As such it returns 3 values: a form-name (symbol), a binding list, and the number of binding pairs from the passed-in binding list it lays claim to. It may also returned a 4th value T to indicate that the returned binding list should be spliced into the generated form.

Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: complex-left-hand-side-p (x)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: consequent-sign-p (x)
Package

edraag.easy-bind.

Source

letmatch.lisp.

Function: equals-sign-or-being-p (x)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: equals-sign-p (x)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: function-binding-p (x)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: function-bindings-splice-implicit-progn (bindings)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: function-keyword-p (x)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: generate-function-binding-list (bindings)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: generate-let*s-and-complex-bindings (bindings body complex-binding-collector)

Generates a LET* form as long as it can collect simple bindings, and complex bindings into a form or forms determined by complex-binding-collector, alternately nested until binding list exhausted, at which point body is spliced into the innermost form. Recognizes the :all keyword and handles bindings accordingly.

Complex-binding-collector must be a function which takes the binding list as argument and returns 3 values: 1) a form-name (a symbol), 2) a list of bindings to give to the form, 3) the number of successive bindings it lays claim to from the passed-in binding list. It may also return a 4th value: whether (default nil) to splice the returned binding list into the generated form.

Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: generate-let*s-and-function-bindings (bindings body form-name)

Used to create a form-generator for generating nested let* and <form-name> forms. Form-name must be a symbol which names a CL form that expects function-like bindings, such as labels or macrolet.

Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: generate-let*s-and-labels (bindings body)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: generate-let*s-and-macrolets (bindings body)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: generate-let*s-and-multiple-value-binds (bindings body)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: generate-let+-expansion (bindings body)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: generate-let-binding-list (bindings)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: generate-symbol-macrolet-bindings (bindings)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: ignorablep (x)
Package

edraag.easy-bind.

Source

letmatch.lisp.

Function: let+-collect-function-bindings (bindings keyword-predicate)

Used to collect binding pairs where the first element is a list which begins with a keyword like :fun or :macro, and transforming these to bindings which can be used by forms like labels and macrolet. Collects bindings only as long as they satisfy predicate.

Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: letmatch-body-check-wellformedness (forms)
Package

edraag.easy-bind.

Source

letmatch.lisp.

Function: macro-binding-p (x)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: macro-keyword-p (x)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: make-function-binding (binding)

Transforms binding ((fn x y) (do-stuff x y)) => (fn (x y) (do-stuff x y)).

Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: map-leaves (tree predicate replacement-fn)

Finds the leaves of the tree and conses up a similar tree where the leaves are replaced according to replacement-fn, but only if they satisfy predicate.

Package

edraag.easy-bind.

Source

letmatch.lisp.

Function: matches (x y)

Implements the rules for matching a left-hand side (x) to a given key-expression (y) in a letmatch form.

Package

edraag.easy-bind.

Source

letmatch.lisp.

Function: multiple-of (n m)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: nmap-leaves (tree predicate action)

Non-consing version of map-leaves. Returns nil, or the result of applying action if tree is an atom and satisfies predicate.

Package

edraag.easy-bind.

Source

letmatch.lisp.

Function: parse-separated-list (forms left-hand-side-predicate separator-predicate)

Parses the forms only as long as pairs of forms are joined according to separator-predicate, like so: (a1 <separator> a2 b1 <separator> b2 ...), and a1, b1... satisfies left-hand-side-predicate. Returns 2 values: 1) a list ((a1 a2) (b1 b2) ...), 2) the number of forms processed, including separators.

Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: simple-left-hand-side-p (x)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: simple-or-complex-left-hand-side-p (x)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: single-splice-implicit-progn (function-binding)

Removes the outer list surrounding the ‘implicit progn’ of a function-binding right-hand side (body).

Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: splice-implicit-progn (forms)

Remove outer list around right-hand sides of arguments to letmatch.

Package

edraag.easy-bind.

Source

letmatch.lisp.

Function: sym-keyword-p (x)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.

Function: values-keyword-p (x)
Package

edraag.easy-bind.

Source

easy-bind-main.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   A   C   D   E   F   G   I   L   M   N   P   S   V   W  
Index Entry  Section

A
all-keyword-p: Private ordinary functions

C
collect-binding-list: Private ordinary functions
collect-let+-complex-bindings: Private ordinary functions
complex-left-hand-side-p: Private ordinary functions
consequent-sign-p: Private ordinary functions

D
define-binding-form: Public macros

E
equals-sign-or-being-p: Private ordinary functions
equals-sign-p: Private ordinary functions

F
Function, all-keyword-p: Private ordinary functions
Function, collect-binding-list: Private ordinary functions
Function, collect-let+-complex-bindings: Private ordinary functions
Function, complex-left-hand-side-p: Private ordinary functions
Function, consequent-sign-p: Private ordinary functions
Function, equals-sign-or-being-p: Private ordinary functions
Function, equals-sign-p: Private ordinary functions
Function, function-binding-p: Private ordinary functions
Function, function-bindings-splice-implicit-progn: Private ordinary functions
Function, function-keyword-p: Private ordinary functions
Function, generate-function-binding-list: Private ordinary functions
Function, generate-let*s-and-complex-bindings: Private ordinary functions
Function, generate-let*s-and-function-bindings: Private ordinary functions
Function, generate-let*s-and-labels: Private ordinary functions
Function, generate-let*s-and-macrolets: Private ordinary functions
Function, generate-let*s-and-multiple-value-binds: Private ordinary functions
Function, generate-let+-expansion: Private ordinary functions
Function, generate-let-binding-list: Private ordinary functions
Function, generate-symbol-macrolet-bindings: Private ordinary functions
Function, ignorablep: Private ordinary functions
Function, let+-collect-function-bindings: Private ordinary functions
Function, letmatch-body-check-wellformedness: Private ordinary functions
Function, macro-binding-p: Private ordinary functions
Function, macro-keyword-p: Private ordinary functions
Function, make-function-binding: Private ordinary functions
Function, map-leaves: Private ordinary functions
Function, matches: Private ordinary functions
Function, multiple-of: Private ordinary functions
Function, nmap-leaves: Private ordinary functions
Function, parse-separated-list: Private ordinary functions
Function, simple-left-hand-side-p: Private ordinary functions
Function, simple-or-complex-left-hand-side-p: Private ordinary functions
Function, single-splice-implicit-progn: Private ordinary functions
Function, splice-implicit-progn: Private ordinary functions
Function, sym-keyword-p: Private ordinary functions
Function, values-keyword-p: Private ordinary functions
function-binding-p: Private ordinary functions
function-bindings-splice-implicit-progn: Private ordinary functions
function-keyword-p: Private ordinary functions

G
generate-function-binding-list: Private ordinary functions
generate-let*s-and-complex-bindings: Private ordinary functions
generate-let*s-and-function-bindings: Private ordinary functions
generate-let*s-and-labels: Private ordinary functions
generate-let*s-and-macrolets: Private ordinary functions
generate-let*s-and-multiple-value-binds: Private ordinary functions
generate-let+-expansion: Private ordinary functions
generate-let-binding-list: Private ordinary functions
generate-symbol-macrolet-bindings: Private ordinary functions

I
ignorablep: Private ordinary functions

L
let+: Public macros
let+-collect-function-bindings: Private ordinary functions
let-: Public macros
letfun: Public macros
letfun-: Public macros
letmacro: Public macros
letmatch: Public macros
letmatch-body-check-wellformedness: Private ordinary functions
letsym: Public macros
letval: Public macros

M
Macro, define-binding-form: Public macros
Macro, let+: Public macros
Macro, let-: Public macros
Macro, letfun: Public macros
Macro, letfun-: Public macros
Macro, letmacro: Public macros
Macro, letmatch: Public macros
Macro, letsym: Public macros
Macro, letval: Public macros
Macro, multi-let: Public macros
Macro, with: Public macros
macro-binding-p: Private ordinary functions
macro-keyword-p: Private ordinary functions
make-function-binding: Private ordinary functions
map-leaves: Private ordinary functions
matches: Private ordinary functions
multi-let: Public macros
multiple-of: Private ordinary functions

N
nmap-leaves: Private ordinary functions

P
parse-separated-list: Private ordinary functions

S
simple-left-hand-side-p: Private ordinary functions
simple-or-complex-left-hand-side-p: Private ordinary functions
single-splice-implicit-progn: Private ordinary functions
splice-implicit-progn: Private ordinary functions
sym-keyword-p: Private ordinary functions

V
values-keyword-p: Private ordinary functions

W
with: Public macros


A.3 Variables