This is the binding-arrows Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:24:27 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
binding-arrows
An implementation of threading macros based on binding anonymous variables
Michał "phoe" Herda <phoe@disroot.org>
MIT
1.0.0
binding-arrows.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
binding-arrows/binding-arrows.asd
binding-arrows/binding-arrows.lisp
binding-arrows/documentation.lisp
binding-arrows/binding-arrows.asd
binding-arrows
(system).
binding-arrows/binding-arrows.lisp
binding-arrows
(system).
-<>
(macro).
(setf -<>)
(setf expander).
-<>>
(macro).
(setf -<>>)
(setf expander).
->
(macro).
(setf ->)
(setf expander).
->*
(macro).
(setf ->*)
(setf expander).
->>
(macro).
(setf ->>)
(setf expander).
as->
(macro).
(setf as->)
(setf expander).
as->*
(macro).
(setf as->*)
(setf expander).
cond-<>
(macro).
(setf cond-<>)
(setf expander).
cond-<>>
(macro).
(setf cond-<>>)
(setf expander).
cond->
(macro).
(setf cond->)
(setf expander).
cond->>
(macro).
(setf cond->>)
(setf expander).
some-<>
(macro).
(setf some-<>)
(setf expander).
some-<>>
(macro).
(setf some-<>>)
(setf expander).
some->
(macro).
(setf some->)
(setf expander).
some->>
(macro).
(setf some->>)
(setf expander).
*valid-cl-place-forms*
(special variable).
as-value
(function).
cond-diamond-value-first
(function).
cond-diamond-value-last
(function).
cond-generate-access-fn
(function).
cond-generate-store-fn
(function).
cond-setf-expansions
(function).
cond-value
(function).
cond-value-first
(function).
cond-value-last
(function).
define-arrow
(macro).
diamond-value
(function).
diamond-value-first
(function).
diamond-value-last
(function).
ensure-cons
(function).
expand-arrow
(function).
expand-arrow-return
(function).
expand-arrow-setf
(function).
expand-arrow-setf-cond-return
(function).
expand-arrow-setf-return
(function).
expand-arrow-setf-some-return
(function).
expand-aux
(function).
invalid-place-p
(function).
make-value-form
(function).
safe-get-setf-expansion
(function).
some-diamond-value-first
(function).
some-diamond-value-last
(function).
some-value
(function).
some-value-first
(function).
some-value-last
(function).
value-first
(function).
value-last
(function).
Packages are listed by definition order.
binding-arrows
common-lisp
.
-<>
(macro).
(setf -<>)
(setf expander).
-<>>
(macro).
(setf -<>>)
(setf expander).
->
(macro).
(setf ->)
(setf expander).
->*
(macro).
(setf ->*)
(setf expander).
->>
(macro).
(setf ->>)
(setf expander).
as->
(macro).
(setf as->)
(setf expander).
as->*
(macro).
(setf as->*)
(setf expander).
cond-<>
(macro).
(setf cond-<>)
(setf expander).
cond-<>>
(macro).
(setf cond-<>>)
(setf expander).
cond->
(macro).
(setf cond->)
(setf expander).
cond->>
(macro).
(setf cond->>)
(setf expander).
some-<>
(macro).
(setf some-<>)
(setf expander).
some-<>>
(macro).
(setf some-<>>)
(setf expander).
some->
(macro).
(setf some->)
(setf expander).
some->>
(macro).
(setf some->>)
(setf expander).
*valid-cl-place-forms*
(special variable).
as-value
(function).
cond-diamond-value-first
(function).
cond-diamond-value-last
(function).
cond-generate-access-fn
(function).
cond-generate-store-fn
(function).
cond-setf-expansions
(function).
cond-value
(function).
cond-value-first
(function).
cond-value-last
(function).
define-arrow
(macro).
diamond-value
(function).
diamond-value-first
(function).
diamond-value-last
(function).
ensure-cons
(function).
expand-arrow
(function).
expand-arrow-return
(function).
expand-arrow-setf
(function).
expand-arrow-setf-cond-return
(function).
expand-arrow-setf-return
(function).
expand-arrow-setf-some-return
(function).
expand-aux
(function).
invalid-place-p
(function).
make-value-form
(function).
safe-get-setf-expansion
(function).
some-diamond-value-first
(function).
some-diamond-value-last
(function).
some-value
(function).
some-value-first
(function).
some-value-last
(function).
value-first
(function).
value-last
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The diamond wand threading macro.
Binds anonymous variables and threads them into subsequent forms:
* by substituting diamond symbols (<>) if they are present in the form,
* as their first arguments (like the -> macro) otherwise.
The diamond symbols are tested by name, not by identity, like LOOP keywords.
The diamond wand does not descend into subforms in its search for diamonds; see the ARROW-MACROS system for an implementation that performs code walking.
For example, the following form:
(-<> foo
bar
(baz)
(quux 1 2 3)
(fred 4 5 6 <>)
(frob 7 <> 8 <> 9))
Is equivalent to:
(let ((temp1 foo)
(temp2 (bar temp1))
(temp3 (baz temp2))
(temp4 (quux temp3 1 2 3))
(temp5 (fred 4 5 6 temp4))
(temp6 (quux 7 temp5 8 temp5 9)))
temp6)
The diamond spear threading macro.
Binds anonymous variables and threads them into subsequent forms:
* by substituting diamond symbols (<>) if they are present in the form,
* as their last arguments (like the ->> macro) otherwise.
The diamond symbols are tested by name, not by identity, like LOOP keywords.
The diamond wand does not descend into subforms in its search for diamonds; see the ARROW-MACROS system for an implementation that performs code walking.
For example, the following form:
(-<>> foo
bar
(baz)
(quux 1 2 3)
(fred 4 5 6 <>)
(frob 7 <> 8 <> 9))
Is equivalent to:
(let ((temp1 foo)
(temp2 (bar temp1))
(temp3 (baz temp2))
(temp4 (quux 1 2 3 temp3))
(temp5 (fred 4 5 6 temp4))
(temp6 (quux 7 temp5 8 temp5 9)))
temp6)
The thread-first threading macro.
Binds anonymous variables and threads them into subsequent forms as their first
arguments.
For example, the following form:
(-> foo
bar
(baz)
(quux 1 2 3))
Is equivalent to:
(let ((temp1 foo)
(temp2 (bar temp1))
(temp3 (baz temp2))
(temp4 (quux temp3 1 2 3)))
temp4)
The inverted thread-first threading macro.
Binds anonymous variables and threads them into subsequent forms as their first
arguments. The order of the forms is altered, so that the last form is used as
the initialization form.
For example, the following form:
(->* bar
(baz)
(quux 1 2 3)
foo)
Is equivalent to:
(-> foo
bar
(baz)
(quux 1 2 3))
And therefore to:
(let ((temp1 foo)
(temp2 (bar temp1))
(temp3 (baz temp2))
(temp4 (quux temp3 1 2 3)))
temp4)
The thread-last threading macro.
Binds anonymous variables and threads them into subsequent forms as their last
arguments.
For example, the following form:
(->> foo
bar
(baz)
(quux 1 2 3))
Is equivalent to:
(let ((temp1 foo)
(temp2 (bar temp1))
(temp3 (baz temp2))
(temp4 (quux 1 2 3 temp3)))
temp4)
The named threading macro.
Binds the provided variable to subsequent forms, which may make use of the
bound variable.
For example, the following form:
(as-> foo var
(bar var)
(baz var)
(quux 1 2 3))
Is equivalent to:
(let* ((var foo)
(var (bar var))
(var (baz var))
(var (quux 1 2 3)))
var)
The inverted named threading macro.
Binds the provided variable to subsequent forms, which may make use of the
bound variable. The order of the forms is altered, so that the last form is used
as the initialization form for the variable.
For example, the following form:
(as->* var
(bar var)
(baz var)
(quux 1 2 3)
foo)
Is equivalent to:
(as-> foo var
(bar var)
(baz var)
(quux 1 2 3))
And therefore to:
(let* ((var foo)
(var (bar var))
(var (baz var))
(var (quux 1 2 3)))
var)
The short-cicruiting diamond thread-first threading macro.
Binds anonymous variables and threads them into subsequent forms:
* by substituting diamond symbols (<>) if they are present in the form,
* as their first arguments (like the -> macro) otherwise.
The binding is only effective when the test of a given form returns true.
If any form returns NIL, the subsequent forms are not evaluated, and NIL is
returned.
For example, the following form:
(cond-<> foo
(barp x y z)
(bazp (baz))
((quuxp thing) (quux 1 <> 2 3)))
Is equivalent to:
(let* ((temp1 foo)
(temp2 (if barp
(-<> temp1 x y z)
temp1))
(temp3 (if bazp
(-<> temp2 (baz))
temp2))
(temp4 (if (quuxp thing)
(-<> temp3 (quux 1 <> 2 3))
temp3)))
temp4)
The short-cicruiting diamond thread-last threading macro.
Binds anonymous variables and threads them into subsequent forms:
* by substituting diamond symbols (<>) if they are present in the form,
* as their last arguments (like the ->> macro) otherwise.
The binding is only effective when the test of a given form returns true.
If any form returns NIL, the subsequent forms are not evaluated, and NIL is
returned.
For example, the following form:
(cond-<>> foo
(barp x y z)
(bazp (baz))
((quuxp thing) (quux 1 <> 2 3)))
Is equivalent to:
(let* ((temp1 foo)
(temp2 (if barp
(-<>> temp1 x y z)
temp1))
(temp3 (if bazp
(-<>> temp2 (baz))
temp2))
(temp4 (if (quuxp thing)
(-<>> temp3 (quux 1 <> 2 3))
temp3)))
temp4)
The conditional thread-first threading macro.
Binds anonymous variables and threads them into the subsequent forms as their
first arguments, but only when the test of a given form returns true.
For example, the following form:
(cond-> foo
(barp x y z)
(bazp (baz))
((quuxp thing) (quux 1 2 3)))
Is equivalent to:
(let* ((temp1 foo)
(temp2 (if barp
(-> temp1 x y z)
temp1))
(temp3 (if bazp
(-> temp2 (baz))
temp2))
(temp4 (if (quuxp thing)
(-> temp3 (quux 1 2 3))
temp3)))
temp4)
The conditional thread-last threading macro.
Binds anonymous variables and threads them into the subsequent forms as their
last arguments, but only when the test of a given form returns true.
For example, the following form:
(cond->> foo
(barp x y z)
(bazp (baz))
((quuxp thing) (quux 1 2 3)))
Is equivalent to:
(let* ((temp1 foo)
(temp2 (if barp
(->> temp1 x y z)
temp1))
(temp3 (if bazp
(->> temp2 (baz))
temp2))
(temp4 (if (quuxp thing)
(->> temp3 (quux 1 2 3))
temp3)))
temp4)
The short-cicruiting diamond thread-first threading macro.
Binds anonymous variables and threads them into subsequent forms:
* by substituting diamond symbols (<>) if they are present in the form,
* as their first arguments (like the -> macro) otherwise.
If any form returns NIL, the subsequent forms are not evaluated, and NIL is
returned.
For example, the following form:
(some-<> foo
bar
(baz :baz)
(quux 1 <> 2 3))
Is equivalent to:
(let ((temp1 foo)
(temp2 (and temp1 (bar temp1)))
(temp3 (and temp2 (baz temp2 :baz)))
(temp4 (and temp3 (quux 1 temp3 2 3))))
temp4)
The short-cicruiting diamond thread-first threading macro.
Binds anonymous variables and threads them into subsequent forms:
* by substituting diamond symbols (<>) if they are present in the form,
* as their last arguments (like the ->> macro) otherwise.
If any form returns NIL, the subsequent forms are not evaluated, and NIL is
returned.
For example, the following form:
(some-<>> foo
bar
(baz :baz)
(quux 1 <> 2 3))
Is equivalent to:
(let ((temp1 foo)
(temp2 (and temp1 (bar temp1)))
(temp3 (and temp2 (baz :baz temp2)))
(temp4 (and temp3 (quux 1 temp3 2 3))))
temp4)
The short-cicruiting thread-first threading macro.
Binds anonymous variables and threads them into subsequent forms as their first
arguments. If any form returns NIL, the subsequent forms are not evaluated, and
NIL is returned.
For example, the following form:
(some-> foo
bar
(baz)
(quux 1 2 3))
Is equivalent to:
(let ((temp1 foo)
(temp2 (and temp1 (bar temp1)))
(temp3 (and temp2 (baz temp2)))
(temp4 (and temp3 (quux temp3 1 2 3))))
temp4)
The short-cicruiting thread-last threading macro.
Binds anonymous variables and threads them into subsequent forms as their last
arguments. If any form returns NIL, the subsequent forms are not evaluated, and
NIL is returned.
For example, the following form:
(some->> foo
bar
(baz)
(quux 1 2 3))
Is equivalent to:
(let ((temp1 foo)
(temp2 (and temp1 (bar temp1)))
(temp3 (and temp2 (baz temp2)))
(temp4 (and temp3 (quux 1 2 3 temp3))))
temp4)
Jump to: | (
-
A C D E F I M S V |
---|
Jump to: | (
-
A C D E F I M S V |
---|
Jump to: | *
S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
* | |||
*valid-cl-place-forms* : | Private special variables | ||
| |||
S | |||
Special Variable, *valid-cl-place-forms* : | Private special variables | ||
|
Jump to: | *
S |
---|
Jump to: | B D F P S |
---|
Jump to: | B D F P S |
---|