This is the amb Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:14:27 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
amb
An implementation of John McCarthy’s ambiguous operator
Michał "phoe" Herda <phoe@disroot.org>
MIT
1.0.0
alexandria
(system).
amb.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
amb/amb.lisp
amb
(system).
amb
.
amb
(macro).
amb-failure
(condition).
amb-failure-stack
(reader method).
constrain
(macro).
*options*
(special variable).
*started-ambs*
(special variable).
generate-binding
(function).
generate-body
(function).
option
(function).
optionp
(function).
parse-amb
(function).
report-amb-failure
(function).
Packages are listed by definition order.
amb
common-lisp
.
amb
(macro).
amb-failure
(condition).
amb-failure-stack
(generic reader).
constrain
(macro).
*options*
(special variable).
*started-ambs*
(special variable).
generate-binding
(function).
generate-body
(function).
option
(function).
optionp
(function).
parse-amb
(function).
report-amb-failure
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
A macro implementation of John McCarthy’s ambiguous operator.
It establishes ambiguous variables and a dynamic environment in which it is
possible to use AMB:CONSTRAIN in order to constrain the ambiguous variables.
BINDING is a list of bindings, where each binding must consist of a symbol
naming a variable, a list of possible values for that variable, and optionally
a :SHUFFLEP keyword argument if the order of values for that variable is meant
to be randomized every time control enters the AMB form.
The :SIGNALP keyword argument sets the signaling behavior for AMB-FAILURE.
NIL does not signal anything, whereas SIGNAL, WARN, and ERROR use the respective
CL functions for signaling the AMB-FAILURE condition. (Note that :SIGNALP set on
any but the outermost AMB has no effect, as only the outermost AMB signals
the condition.)
If BODY returns true, then that value becomes the return value of AMB. Otherwise, backtracking occurs until all possibilities are exhausted. In that case, AMB-FAILURE is signaled (via WARN) and NIL is returned.
A macro for adding a constraint to an ambiguous variable. If the constraint is satisfied, its value is returned (for convenience inside AMB); otherwise, backtracking occurs (via CL:THROW).
amb
.
amb-failure
)) ¶Jump to: | A C F G M O P R |
---|
Jump to: | A C F G M O P R |
---|
Jump to: | *
S |
---|
Jump to: | *
S |
---|
Jump to: | A C D F P S |
---|
Jump to: | A C D F P S |
---|