This is the arrows Reference Manual, version 0.2.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 03:19:33 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
arrows
Implements -> and ->> from Clojure, as well as several expansions on the idea.
Svante von Erichsen <svante.v.erichsen@web.de>
CC0
0.2.0
arrows.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
arrows/arrows.lisp
arrows
(system).
<>p
(function).
cond-inserter
(function).
diamond-inserter
(function).
expand-arrow
(function).
expand-cond
(function).
expand-some
(function).
insert-first
(function).
insert-last
(function).
simple-inserter
(function).
some-inserter
(function).
Packages are listed by definition order.
arrows
common-lisp
.
<>p
(function).
cond-inserter
(function).
diamond-inserter
(function).
expand-arrow
(function).
expand-cond
(function).
expand-some
(function).
insert-first
(function).
insert-last
(function).
simple-inserter
(function).
some-inserter
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Like ->, but if a form in FORMS has one or more symbols named <> as top-level element, each such symbol is substituted by the primary result of the form accumulated so far, instead of it being inserted as first argument. Also known as diamond wand.
Like -<>, but if a form has no symbol named <>, the insertion is done at the end like in ->>. Also known as diamond spear.
Inserts INITIAL-FORM as first argument into the first of FORMS, the result into the next, etc., before evaluation. FORMS are treated as list designators.
Like ->, but the last form is used as initial form, then the remaining forms used as in ->. This is intended for inversing the default in a ->> form.
Example:
(->> 3
(/ 12)
(->* (/ 2)))
=> 2
Like ->, but the forms are inserted as last argument instead of first.
Binds INITIAL-FORM to VAR, then successively each of FORMS to VAR, finally returns the last value of VAR.
Shorthand for the combination of ->* and as->: the last form is used for initial binding, then the remaining forms used as in as->. This is intended for overriding the default in a ->> form.
CLAUSES is a list of clauses similar to COND clauses, each clause comprising first a test form, then a body of further forms. Cond-> evaluates INITIAL-FORM to a value, then for each clause whose test evaluates to true, pipes (as in ->) the value through each form in the body of the clause. Note that unlike in COND, there is no short-circuiting: each clause gets tested regardless of the outcome of the clauses before.
Like cond->, but with insertion behaviour as in ->>.
Like ->, but short-circuits to nil as soon as either INITIAL-FORM or any of FORMS return nil. This is like all these forms are lifted to the maybe monad.
Like some->, but with insertion behaviour as in ->>.
Predicate identifying the placeholders for the -<> and -<>> macros.
Inserts ARG into the list form SURROUND as its first argument, after the operator.
Inserts ARG into the list form SURROUND as its last argument.
Jump to: | -
<
A C D E F I M S |
---|
Jump to: | -
<
A C D E F I M S |
---|
Jump to: | A F P S |
---|
Jump to: | A F P S |
---|