This is the rutils Reference Manual, version 5.2.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:38:00 2024 GMT+0.
rutils/rutils.asd
rutils/core/packages.lisp
rutils/core/readtable.lisp
rutils/core/symbol.lisp
rutils/core/misc.lisp
rutils/core/anaphora.lisp
rutils/core/list.lisp
rutils/core/string.lisp
rutils/core/hash-table.lisp
rutils/core/hash-set.lisp
rutils/core/tree.lisp
rutils/core/array.lisp
rutils/core/sequence.lisp
rutils/core/pair.lisp
rutils/core/kv.lisp
rutils/core/generic.lisp
rutils/core/bind.lisp
rutils/core/iter.lisp
rutils/core/abbr.lisp
rutils/core/rutils.lisp
rutils.array
rutils.bind
rutils.iter
rutils
rutils.symbol
rutils.kv
rutils.hash-set
rutils.anaphora
rutils.list
rtl
rutils.hash-table
rtl-user
rutils-user
rutils.pair
rutils.readtable
rutils.tree
rutils.string
rutils.abbr
rutils.generic
rutils.misc
rutils.sequence
The main system appears first, followed by any subsystem dependency.
rutils
A collection of basic utilities for syntactic
extension and basic data structure handling,
developed over the years of CL history by efforts of different individuals,
and gathered under the unbrella of a hierarchy of packages
which can be used on-demand.
Vsevolod Dyomkin <vseloved@gmail.com>
Vsevolod Dyomkin <vseloved@gmail.com>
3-clause MIT licence
5.2.1
named-readtables
(system).
closer-mop
(system).
core
(module).
Modules are listed depth-first from the system components tree.
rutils/core
rutils
(system).
packages.lisp
(file).
readtable.lisp
(file).
symbol.lisp
(file).
misc.lisp
(file).
anaphora.lisp
(file).
list.lisp
(file).
string.lisp
(file).
hash-table.lisp
(file).
hash-set.lisp
(file).
tree.lisp
(file).
array.lisp
(file).
sequence.lisp
(file).
pair.lisp
(file).
kv.lisp
(file).
generic.lisp
(file).
bind.lisp
(file).
iter.lisp
(file).
abbr.lisp
(file).
rutils.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
rutils/rutils.asd
rutils/core/packages.lisp
rutils/core/readtable.lisp
rutils/core/symbol.lisp
rutils/core/misc.lisp
rutils/core/anaphora.lisp
rutils/core/list.lisp
rutils/core/string.lisp
rutils/core/hash-table.lisp
rutils/core/hash-set.lisp
rutils/core/tree.lisp
rutils/core/array.lisp
rutils/core/sequence.lisp
rutils/core/pair.lisp
rutils/core/kv.lisp
rutils/core/generic.lisp
rutils/core/bind.lisp
rutils/core/iter.lisp
rutils/core/abbr.lisp
rutils/core/rutils.lisp
rutils/core/packages.lisp
core
(module).
+default-opts+
(special variable).
rutils/core/readtable.lisp
packages.lisp
(file).
core
(module).
^-reader
(function).
trivial-positional-lambda
(macro).
rutils/core/symbol.lisp
readtable.lisp
(file).
core
(module).
abbr
(macro).
ensure-keyword
(function).
ensure-symbol
(function).
eval-always
(macro).
make-gensym-list
(function).
package-external-symbols
(function).
package-internal-symbols
(function).
package-symbols
(function).
re-export-symbols
(function).
rutils-style-warning
(condition).
with-gensyms
(macro).
rutils/core/misc.lisp
symbol.lisp
(file).
core
(module).
->
(macro).
->>
(macro).
2nd
(macro).
<-
(macro).
=>
(macro).
and2
(function).
case-failure
(condition).
coercef
(macro).
cswitch
(macro).
dcase
(macro).
dccase
(macro).
decase
(macro).
eswitch
(macro).
less
(function).
more
(function).
multiple-value-prog2
(macro).
named-lambda
(macro).
not-less
(function).
not-more
(function).
once-only
(macro).
or2
(function).
pcase
(macro).
pccase
(macro).
pecase
(macro).
re-setf
(macro).
switch
(macro).
true
(function).
void
(macro).
xor
(macro).
xor2
(function).
case-failure-name
(reader method).
case-failure-possibilities
(reader method).
expand-destructuring-case
(function).
expand-predicate-case
(function).
extract-function-name
(function).
generate-switch-body
(function).
rutils/core/anaphora.lisp
misc.lisp
(file).
core
(module).
and-it
(macro).
and-let
(macro).
cond-it
(macro).
cond-let
(macro).
dowhile-it
(macro).
dowhile-let
(macro).
if-it
(macro).
if-let
(macro).
when-it
(macro).
when-let
(macro).
rutils/core/list.lisp
anaphora.lisp
(file).
core
(module).
alist-to-plist
(function).
alistp
(function).
appendf
(macro).
assoc1
(function).
atomize
(function).
butlast2
(function).
concat
(function).
dcons
(function).
delete-from-plist
(function).
dlistp
(function).
doplist
(macro).
dyadic
(function).
ensure-list
(function).
flatten
(function).
interleave
(function).
interpose
(function).
last1
(function).
(setf last1)
(function).
listcase
(macro).
mapcanindex
(function).
mapindex
(function).
mappend
(function).
maptimes
(function).
nconcf
(macro).
nreversef
(macro).
nunionf
(macro).
permutations
(function).
plist-to-alist
(function).
plistp
(function).
range
(function).
remove-from-plist
(function).
remove-idx
(function).
reversef
(macro).
set-equal
(function).
single
(function).
take
(function).
tryadic
(function).
unionf
(macro).
with-output-to-list
(macro).
zip
(function).
zip*
(function).
zip*-with
(function).
zip-with
(function).
rutils/core/string.lisp
list.lisp
(file).
core
(module).
blankp
(function).
dolines
(macro).
ends-with
(function).
fmt
(function).
last-char
(function).
read-file
(function).
split-string
(function).
starts-with
(function).
strcat
(function).
string-designator
(type).
strjoin
(function).
substr
(function).
white-char-p
(function).
with-out-file
(macro).
rutils/core/hash-table.lisp
string.lisp
(file).
core
(module).
copy-hash-table
(function).
dotable
(macro).
getsethash
(macro).
hash-table-from-alist
(function).
hash-table-from-plist
(function).
hash-table-keys
(function).
hash-table-to-alist
(function).
hash-table-to-plist
(function).
hash-table-vals
(function).
in#
(function).
merge-hash-tables
(function).
merge-hash-tables-with
(function).
print-hash-table
(function).
sethash
(function).
takehash
(function).
toggle-print-hash-table
(function).
with-keys
(macro).
rutils/core/hash-set.lisp
hash-table.lisp
(file).
core
(module).
rutils/core/tree.lisp
hash-set.lisp
(file).
core
(module).
rutils/core/array.lisp
tree.lisp
(file).
core
(module).
array-index
(type).
array-length
(type).
copy-array
(function).
dovec
(macro).
slice
(function).
vec
(function).
rutils/core/sequence.lisp
array.lisp
(file).
core
(module).
deletef
(macro).
doindex
(macro).
emptyp
(function).
equal-lengths
(compiler macro).
equal-lengths
(function).
group
(function).
keep
(function).
last-elt
(function).
(setf last-elt)
(function).
length=
(function).
map*
(function).
nshuffle
(function).
partition-with
(function).
product
(function).
removef
(macro).
rotate
(function).
safe-sort
(function).
shuffle
(function).
split-sequence
(function).
split-sequence-if
(function).
split-sequence-if-not
(function).
sum
(function).
delete/swapped-arguments
(function).
remove/swapped-arguments
(function).
rotate-head-to-tail
(function).
rotate-tail-to-head
(function).
rutils/core/pair.lisp
sequence.lisp
(file).
core
(module).
pair-right
(function).
(setf pair-right)
(function).
rutils/core/kv.lisp
rutils/core/generic.lisp
kv.lisp
(file).
core
(module).
copy
(generic function).
(setf generic-elt)
(setf expander).
generic-elt
(generic function).
generic-elt-error
(condition).
generic-elt-error-key
(reader method).
(setf generic-elt-error-key)
(writer method).
generic-elt-error-obj
(reader method).
(setf generic-elt-error-obj)
(writer method).
print-object
(method).
(setf smart-slot-value)
(setf expander).
smart-slot-value
(generic function).
tally
(generic function).
adding-smart-slot-methods
(macro).
generic-setf
(generic function).
smart-set-slot-value
(generic function).
rutils/core/bind.lisp
generic.lisp
(file).
core
(module).
bind
(macro).
bind-dispatch
(generic function).
*bind-ignores*
(special variable).
expand-binding
(function).
subst-ignore
(function).
rutils/core/iter.lisp
bind.lisp
(file).
core
(module).
defclause
(macro).
defclause-driver
(macro).
defclause-sequence
(macro).
defmacro-clause
(macro).
defmacro-driver
(macro).
display-iter-clauses
(function).
dsetq
(macro).
iter
(macro).
iter-version
(special variable).
*accum-var-alist*
(special variable).
*always-declare-variables*
(special variable).
*bindings*
(special variable).
*block-name*
(special variable).
*clause*
(special variable).
*clause-info-index*
(special variable).
*declaration-context?*
(special variable).
*declarations*
(special variable).
*declare-variables*
(special variable).
*decls*
(special variable).
*driver-info-alist*
(special variable).
*env*
(special variable).
*final*
(special variable).
*finalp*
(special variable).
*genvar-counter*
(special variable).
*initial*
(special variable).
*internal-variables*
(special variable).
*list-end-test*
(special variable).
*loop-body-wrappers*
(special variable).
*loop-end*
(special variable).
*loop-end-used?*
(special variable).
*loop-step*
(special variable).
*loop-step-used?*
(special variable).
*loop-top*
(special variable).
*previous-vars-alist*
(special variable).
*result-var*
(special variable).
*shared-bindings-alist*
(special variable).
*special-clause-alist*
(special variable).
*special-form-alist*
(special variable).
*step*
(special variable).
*temps*
(special variable).
*temps-in-use*
(special variable).
*top-level?*
(special variable).
*type-alist*
(special variable).
+fill-col+
(special variable).
+sequence-keyword-list+
(special variable).
+standard-type-symbols+
(special variable).
add-binding
(function).
add-driver-info
(function).
add-internal-var
(function).
add-internal-vars
(function).
add-loop-body-wrapper
(function).
add-progn
(function).
after-each
(function).
ambiguity-check-clause
(function).
ambiguity-check-index
(function).
ambiguous-clauses?
(function).
apply-clause-function
(function).
apply-subst-expr
(function).
arg-check
(function).
augment
(macro).
bug
(function).
build-index
(function).
check-internal-variables
(function).
check-sequence-keywords
(function).
clause-accumulate-by-42
(function).
clause-adjoin-37
(function).
clause-always-30
(function).
clause-append-39
(function).
clause-collect-36
(function).
clause-count-22
(function).
clause-error
(function).
clause-find-max-34
(function).
clause-find-min-35
(function).
clause-find-such-that-33
(function).
clause-for-2
(function).
clause-for-=-20
(function).
clause-for-do-next-17
(function).
clause-for-first-then-21
(function).
clause-for-in-4
(function).
clause-for-in-file-14
(function).
clause-for-in-hashtable-11
(function).
clause-for-in-package-13
(macro).
clause-for-in-packages-12
(function).
clause-for-in-sequence-7
(function).
clause-for-in-stream-15
(function).
clause-for-in-string-9
(function).
clause-for-in-vector-5
(function).
clause-for-index-of-sequence-8
(function).
clause-for-index-of-string-10
(function).
clause-for-index-of-vector-6
(function).
clause-for-initially-then-19
(function).
clause-for-next-16
(function).
clause-for-on-3
(function).
clause-for-prev-43
(function).
clause-info
(structure).
clause-info-doc-string
(reader).
(setf clause-info-doc-string)
(writer).
clause-info-function
(reader).
(setf clause-info-function)
(writer).
clause-info-generator?
(reader).
(setf clause-info-generator?)
(writer).
clause-info-keywords
(reader).
(setf clause-info-keywords)
(writer).
clause-info-p
(function).
clause-info-req-keywords
(reader).
(setf clause-info-req-keywords)
(writer).
clause-matches?
(function).
clause-max-26
(function).
clause-min-27
(function).
clause-mult-24
(function).
clause-nconc-38
(function).
clause-never-31
(function).
clause-nunion-41
(function).
clause-reduce-by-25
(function).
clause-repeat-1
(function).
clause-sum-23
(function).
clause-there-is-32
(function).
clause-union-40
(function).
clause-until-29
(function).
clause-warning
(function).
clause-while-28
(function).
clause-with-18
(function).
constant?
(function).
contains-duplicates?
(function).
copy-clause-info
(function).
copy-driver-info
(function).
copy-previous-info
(function).
copy-save-info
(function).
def-special-clause
(macro).
default-driver-code
(function).
define-clause
(function).
defsynonym
(macro).
disp-std-clauses
(function).
display-clause
(function).
display-index
(function).
display-kws
(function).
do-destructuring-bindings
(function).
do-dsetq
(function).
do-extra-save-var-hack
(function).
driver-info
(structure).
driver-info-generator?
(reader).
(setf driver-info-generator?)
(writer).
driver-info-next-code
(reader).
(setf driver-info-next-code)
(writer).
driver-info-p
(function).
driver-info-used
(reader).
(setf driver-info-used)
(writer).
dsetq-error
(function).
duplicable?
(function).
else
(function).
eval-const-expr
(function).
expr-type-only
(function).
expression-type
(function).
extract-var
(function).
extract-vars
(function).
finally
(function).
finally-protected
(function).
finish
(function).
first-iteration-p
(function).
first-time-p
(function).
free-variables
(function).
free-vars
(function).
free-vars-fspec
(function).
free-vars-list
(function).
function-quoted?
(function).
generate-function-step-code
(function).
genvar
(function).
get-clause-info
(function).
if-1st-time
(function).
in
(function).
index-add
(function).
index-lookup
(function).
index?
(function).
initially
(function).
insert-previous-code
(function).
install-clause-info
(function).
install-clause-info-1
(function).
install-special-clause-function
(function).
intern-previous-info
(function).
internal-variable?
(function).
is-iter-clause?
(function).
is-save-var
(function).
lambda-expression?
(function).
lambda-list-vars
(function).
leave
(function).
list-of-forms?
(function).
local-binding-check
(function).
make-accum-var-binding
(function).
make-accum-var-binding-internal
(function).
make-accum-var-default-binding
(function).
make-application
(function).
make-binding
(function).
make-binding-internal
(function).
make-clause-info
(function).
make-default-binding
(function).
make-destructuring-bindings
(function).
make-driver-info
(function).
make-dsetqs
(function).
make-funcall
(function).
make-function-name
(function).
make-initial-value
(function).
make-mv-dsetqs
(function).
make-next-code
(function).
make-post-save-var
(function).
make-prev-code
(function).
make-previous-info
(function).
make-save-info
(function).
make-save-previous-code
(function).
make-save-vars
(function).
make-shared-binding
(function).
make-var-and-binding
(function).
make-var-and-default-binding
(function).
next
(function).
next-iteration
(function).
prepend
(macro).
preprocess-clause
(function).
previous-info
(structure).
previous-info-class
(reader).
(setf previous-info-class)
(writer).
previous-info-code
(reader).
(setf previous-info-code)
(writer).
previous-info-p
(function).
previous-info-save-info-list
(reader).
(setf previous-info-save-info-list)
(writer).
previous-info-var
(reader).
(setf previous-info-var)
(writer).
process-clause
(function).
process-top-level-decls
(function).
progn-wrap
(function).
quoted?
(function).
register-previous-code
(function).
remove-clause
(function).
return-code
(function).
return-code-modifying-body
(function).
return-collection-code
(function).
return-driver-code
(macro).
return-extremum-code
(function).
return-find-extremum-code
(function).
return-reduction-code
(function).
return-seq-code
(function).
return-sequence-code
(macro).
return-stream-driver-code
(function).
save-info
(structure).
save-info-iv-ref
(reader).
(setf save-info-iv-ref)
(writer).
save-info-p
(function).
save-info-save-var
(reader).
(setf save-info-save-var)
(writer).
save-info-save-vars
(reader).
(setf save-info-save-vars)
(writer).
self-evaluating?
(function).
special-form?
(function).
splice-in-code
(function).
split-clause-template
(function).
split-list-odd-even
(function).
starts-clause?
(function).
synonym
(function).
terminate
(function).
the-expression?
(function).
top-level-check
(function).
var-binding?
(function).
var-declaration
(function).
var-spec?
(function).
var-type
(function).
var-value-returned
(function).
walk
(function).
walk-arglist
(function).
walk-cddr
(function).
walk-cddr-with-declarations
(function).
walk-cdr
(function).
walk-cdr-with-declarations
(function).
walk-declare
(function).
walk-expr
(function).
walk-flet
(function).
walk-fspec
(function).
walk-function
(function).
walk-let
(function).
walk-let*-bindings
(function).
walk-let-binding
(function).
walk-let-bindings
(function).
walk-list
(function).
walk-list-nconcing
(function).
walk-macrolet
(function).
walk-multiple-value-bind
(function).
walk-progn
(function).
walk-setq
(function).
walk-special-form
(function).
with-temporary
(macro).
wrap-form
(function).
rutils/core/abbr.lisp
iter.lisp
(file).
core
(module).
(setf ?)
(setf expander).
flet*
(macro).
(setf get#)
(setf expander).
rutils/core/rutils.lisp
abbr.lisp
(file).
core
(module).
*all-packages*
(special variable).
Packages are listed by definition order.
rutils.array
rutils.bind
rutils.iter
rutils
rutils.symbol
rutils.kv
rutils.hash-set
rutils.anaphora
rutils.list
rtl
rutils.hash-table
rtl-user
rutils-user
rutils.pair
rutils.readtable
rutils.tree
rutils.string
rutils.abbr
rutils.generic
rutils.misc
rutils.sequence
rutils.array
Array utilities.
common-lisp
.
rutils.anaphora
.
rutils.misc
.
rutils.readtable
.
rutils.symbol
.
array-index
(type).
array-length
(type).
copy-array
(function).
dovec
(macro).
slice
(function).
vec
(function).
rutils.bind
Unified extensible bind operator.
common-lisp
.
rutils.generic
.
rutils.list
.
rutils.misc
.
rutils.readtable
.
rutils.symbol
.
bind
(macro).
bind-dispatch
(generic function).
with
(macro).
*bind-ignores*
(special variable).
expand-binding
(function).
subst-ignore
(function).
rutils.iter
Iterate macro with keywords for clauses.
common-lisp
.
rutils.list
.
rutils.misc
.
rutils.readtable
.
rutils.string
.
rutils.symbol
.
defclause
(macro).
defclause-driver
(macro).
defclause-sequence
(macro).
defmacro-clause
(macro).
defmacro-driver
(macro).
display-iter-clauses
(function).
dsetq
(macro).
iter
(macro).
iter-version
(special variable).
*accum-var-alist*
(special variable).
*always-declare-variables*
(special variable).
*bindings*
(special variable).
*block-name*
(special variable).
*clause*
(special variable).
*clause-info-index*
(special variable).
*declaration-context?*
(special variable).
*declarations*
(special variable).
*declare-variables*
(special variable).
*decls*
(special variable).
*driver-info-alist*
(special variable).
*env*
(special variable).
*final*
(special variable).
*finalp*
(special variable).
*genvar-counter*
(special variable).
*initial*
(special variable).
*internal-variables*
(special variable).
*list-end-test*
(special variable).
*loop-body-wrappers*
(special variable).
*loop-end*
(special variable).
*loop-end-used?*
(special variable).
*loop-step*
(special variable).
*loop-step-used?*
(special variable).
*loop-top*
(special variable).
*previous-vars-alist*
(special variable).
*result-var*
(special variable).
*shared-bindings-alist*
(special variable).
*special-clause-alist*
(special variable).
*special-form-alist*
(special variable).
*step*
(special variable).
*temps*
(special variable).
*temps-in-use*
(special variable).
*top-level?*
(special variable).
*type-alist*
(special variable).
+fill-col+
(special variable).
+sequence-keyword-list+
(special variable).
+standard-type-symbols+
(special variable).
add-binding
(function).
add-driver-info
(function).
add-internal-var
(function).
add-internal-vars
(function).
add-loop-body-wrapper
(function).
add-progn
(function).
after-each
(function).
ambiguity-check-clause
(function).
ambiguity-check-index
(function).
ambiguous-clauses?
(function).
apply-clause-function
(function).
apply-subst-expr
(function).
arg-check
(function).
augment
(macro).
bug
(function).
build-index
(function).
check-internal-variables
(function).
check-sequence-keywords
(function).
clause-accumulate-by-42
(function).
clause-adjoin-37
(function).
clause-always-30
(function).
clause-append-39
(function).
clause-collect-36
(function).
clause-count-22
(function).
clause-error
(function).
clause-find-max-34
(function).
clause-find-min-35
(function).
clause-find-such-that-33
(function).
clause-for-2
(function).
clause-for-=-20
(function).
clause-for-do-next-17
(function).
clause-for-first-then-21
(function).
clause-for-in-4
(function).
clause-for-in-file-14
(function).
clause-for-in-hashtable-11
(function).
clause-for-in-package-13
(macro).
clause-for-in-packages-12
(function).
clause-for-in-sequence-7
(function).
clause-for-in-stream-15
(function).
clause-for-in-string-9
(function).
clause-for-in-vector-5
(function).
clause-for-index-of-sequence-8
(function).
clause-for-index-of-string-10
(function).
clause-for-index-of-vector-6
(function).
clause-for-initially-then-19
(function).
clause-for-next-16
(function).
clause-for-on-3
(function).
clause-for-prev-43
(function).
clause-info
(structure).
clause-info-doc-string
(reader).
(setf clause-info-doc-string)
(writer).
clause-info-function
(reader).
(setf clause-info-function)
(writer).
clause-info-generator?
(reader).
(setf clause-info-generator?)
(writer).
clause-info-keywords
(reader).
(setf clause-info-keywords)
(writer).
clause-info-p
(function).
clause-info-req-keywords
(reader).
(setf clause-info-req-keywords)
(writer).
clause-matches?
(function).
clause-max-26
(function).
clause-min-27
(function).
clause-mult-24
(function).
clause-nconc-38
(function).
clause-never-31
(function).
clause-nunion-41
(function).
clause-reduce-by-25
(function).
clause-repeat-1
(function).
clause-sum-23
(function).
clause-there-is-32
(function).
clause-union-40
(function).
clause-until-29
(function).
clause-warning
(function).
clause-while-28
(function).
clause-with-18
(function).
constant?
(function).
contains-duplicates?
(function).
copy-clause-info
(function).
copy-driver-info
(function).
copy-previous-info
(function).
copy-save-info
(function).
def-special-clause
(macro).
default-driver-code
(function).
define-clause
(function).
defsynonym
(macro).
disp-std-clauses
(function).
display-clause
(function).
display-index
(function).
display-kws
(function).
do-destructuring-bindings
(function).
do-dsetq
(function).
do-extra-save-var-hack
(function).
driver-info
(structure).
driver-info-generator?
(reader).
(setf driver-info-generator?)
(writer).
driver-info-next-code
(reader).
(setf driver-info-next-code)
(writer).
driver-info-p
(function).
driver-info-used
(reader).
(setf driver-info-used)
(writer).
dsetq-error
(function).
duplicable?
(function).
else
(function).
eval-const-expr
(function).
expr-type-only
(function).
expression-type
(function).
extract-var
(function).
extract-vars
(function).
finally
(function).
finally-protected
(function).
finish
(function).
first-iteration-p
(function).
first-time-p
(function).
free-variables
(function).
free-vars
(function).
free-vars-fspec
(function).
free-vars-list
(function).
function-quoted?
(function).
generate-function-step-code
(function).
genvar
(function).
get-clause-info
(function).
if-1st-time
(function).
in
(function).
index-add
(function).
index-lookup
(function).
index?
(function).
initially
(function).
insert-previous-code
(function).
install-clause-info
(function).
install-clause-info-1
(function).
install-special-clause-function
(function).
intern-previous-info
(function).
internal-variable?
(function).
is-iter-clause?
(function).
is-save-var
(function).
lambda-expression?
(function).
lambda-list-vars
(function).
leave
(function).
list-of-forms?
(function).
local-binding-check
(function).
make-accum-var-binding
(function).
make-accum-var-binding-internal
(function).
make-accum-var-default-binding
(function).
make-application
(function).
make-binding
(function).
make-binding-internal
(function).
make-clause-info
(function).
make-default-binding
(function).
make-destructuring-bindings
(function).
make-driver-info
(function).
make-dsetqs
(function).
make-funcall
(function).
make-function-name
(function).
make-initial-value
(function).
make-mv-dsetqs
(function).
make-next-code
(function).
make-post-save-var
(function).
make-prev-code
(function).
make-previous-info
(function).
make-save-info
(function).
make-save-previous-code
(function).
make-save-vars
(function).
make-shared-binding
(function).
make-var-and-binding
(function).
make-var-and-default-binding
(function).
next
(function).
next-iteration
(function).
prepend
(macro).
preprocess-clause
(function).
previous-info
(structure).
previous-info-class
(reader).
(setf previous-info-class)
(writer).
previous-info-code
(reader).
(setf previous-info-code)
(writer).
previous-info-p
(function).
previous-info-save-info-list
(reader).
(setf previous-info-save-info-list)
(writer).
previous-info-var
(reader).
(setf previous-info-var)
(writer).
process-clause
(function).
process-top-level-decls
(function).
progn-wrap
(function).
quoted?
(function).
register-previous-code
(function).
remove-clause
(function).
return-code
(function).
return-code-modifying-body
(function).
return-collection-code
(function).
return-driver-code
(macro).
return-extremum-code
(function).
return-find-extremum-code
(function).
return-reduction-code
(function).
return-seq-code
(function).
return-sequence-code
(macro).
return-stream-driver-code
(function).
save-info
(structure).
save-info-iv-ref
(reader).
(setf save-info-iv-ref)
(writer).
save-info-p
(function).
save-info-save-var
(reader).
(setf save-info-save-var)
(writer).
save-info-save-vars
(reader).
(setf save-info-save-vars)
(writer).
self-evaluating?
(function).
special-form?
(function).
splice-in-code
(function).
split-clause-template
(function).
split-list-odd-even
(function).
starts-clause?
(function).
synonym
(function).
terminate
(function).
the-expression?
(function).
top-level-check
(function).
var-binding?
(function).
var-declaration
(function).
var-spec?
(function).
var-type
(function).
var-value-returned
(function).
walk
(function).
walk-arglist
(function).
walk-cddr
(function).
walk-cddr-with-declarations
(function).
walk-cdr
(function).
walk-cdr-with-declarations
(function).
walk-declare
(function).
walk-expr
(function).
walk-flet
(function).
walk-fspec
(function).
walk-function
(function).
walk-let
(function).
walk-let*-bindings
(function).
walk-let-binding
(function).
walk-let-bindings
(function).
walk-list
(function).
walk-list-nconcing
(function).
walk-macrolet
(function).
walk-multiple-value-bind
(function).
walk-progn
(function).
walk-setq
(function).
walk-special-form
(function).
with-temporary
(macro).
wrap-form
(function).
rutils
The whole set of utilities in one package.
*all-packages*
(special variable).
rutils.symbol
Core symbol-manipulation utilities.
common-lisp
.
rutils.readtable
.
abbr
(macro).
ensure-keyword
(function).
ensure-symbol
(function).
eval-always
(macro).
make-gensym-list
(function).
mkeyw
(function).
mksym
(function).
package-external-symbols
(function).
package-internal-symbols
(function).
package-symbols
(function).
re-export-symbols
(function).
rutils-style-warning
(condition).
w/uniqs
(macro).
with-gensyms
(macro).
with-unique-names
(macro).
rutils.kv
Key-value utilities.
common-lisp
.
rutils.hash-table
.
rutils.list
.
rutils.misc
.
rutils.readtable
.
rutils.symbol
.
rutils.hash-set
Hash-set utilities.
common-lisp
.
rutils.hash-table
.
rutils.misc
.
rutils.readtable
.
rutils.symbol
.
rutils.anaphora
Anaphoric control constructs.
common-lisp
.
rutils.misc
.
rutils.readtable
.
rutils.symbol
.
aand
(macro).
acond
(macro).
adowhile
(macro).
aif
(macro).
and-bind
(macro).
and-it
(macro).
and-let
(macro).
awhen
(macro).
cond-bind
(macro).
cond-it
(macro).
cond-let
(macro).
dowhile-bind
(macro).
dowhile-it
(macro).
dowhile-let
(macro).
if-bind
(macro).
if-it
(macro).
if-let
(macro).
when-bind
(macro).
when-it
(macro).
when-let
(macro).
rutils.list
List utilities.
common-lisp
.
rutils.misc
.
rutils.readtable
.
rutils.symbol
.
alist-to-plist
(function).
alistp
(function).
appendf
(macro).
assoc1
(function).
atomize
(function).
butlast2
(function).
concat
(function).
dcons
(function).
delete-from-plist
(function).
dlistp
(function).
doplist
(macro).
dyadic
(function).
ensure-list
(function).
flat-map
(function).
flatten
(function).
interleave
(function).
interpose
(function).
last1
(function).
(setf last1)
(function).
listcase
(macro).
mapcanindex
(function).
mapcat
(function).
mapindex
(function).
mappend
(function).
maptimes
(function).
mklist
(function).
nconcf
(macro).
nreversef
(macro).
nunionf
(macro).
permutations
(function).
plist-to-alist
(function).
plistp
(function).
range
(function).
remove-from-plist
(function).
remove-idx
(function).
reversef
(macro).
set-equal
(function).
single
(function).
take
(function).
tryadic
(function).
unionf
(macro).
with-output-to-list
(macro).
zip
(function).
zip*
(function).
zip*-with
(function).
zip-with
(function).
rtl
The whole set of utilities + abbreviations in one package.
rutil
common-lisp
.
rutils
.
rutils.abbr
.
rutils.hash-table
Hash-table utilities.
common-lisp
.
rutils.list
.
rutils.misc
.
rutils.readtable
.
rutils.string
.
rutils.symbol
.
alist->ht
(function).
copy-hash-table
(function).
dotable
(macro).
(setf get#)
(setf expander).
get#
(function).
getset#
(macro).
getsethash
(macro).
hash-table-from-alist
(function).
hash-table-from-plist
(function).
hash-table-keys
(function).
hash-table-to-alist
(function).
hash-table-to-plist
(function).
hash-table-vals
(function).
ht->alist
(function).
ht->plist
(function).
ht-count
(function).
ht-keys
(function).
ht-vals
(function).
in#
(function).
merge-hash-tables
(function).
merge-hash-tables-with
(function).
merge-hts
(function).
merge-hts-with
(function).
p#
(function).
plist->ht
(function).
print-hash-table
(function).
print-ht
(function).
rem#
(function).
set#
(function).
sethash
(function).
take#
(function).
takehash
(function).
toggle-print-hash-table
(function).
with-keys
(macro).
rutils.pair
Generic pair data structure.
common-lisp
.
rutils.list
.
rutils.misc
.
rutils.readtable
.
rutils.symbol
.
copy-pair
(function).
pair-right
(function).
(setf pair-right)
(function).
rutils.readtable
Literate syntax definitions.
common-lisp
.
editor-hints.named-readtables
.
^-reader
(function).
trivial-positional-lambda
(macro).
rutils.tree
Tree utilities.
common-lisp
.
rutils.anaphora
.
rutils.list
.
rutils.misc
.
rutils.readtable
.
rutils.symbol
.
rutils.string
String utilities.
common-lisp
.
rutils.anaphora
.
rutils.list
.
rutils.misc
.
rutils.readtable
.
rutils.symbol
.
blankp
(function).
dolines
(macro).
ends-with
(function).
fmt
(function).
last-char
(function).
read-file
(function).
slurp
(function).
split-string
(function).
starts-with
(function).
strcat
(function).
string-designator
(type).
strjoin
(function).
substr
(function).
white-char-p
(function).
with-out-file
(macro).
rutils.abbr
Abbreviations of some common utilities with long names.
common-lisp
.
rutils.list
.
rutils.misc
.
rutils.symbol
.
rtl
.
rutils.generic
Generic access, copy, tally.
common-lisp
.
rutils.hash-table
.
rutils.list
.
rutils.misc
.
rutils.pair
.
rutils.readtable
.
rutils.sequence
.
rutils.symbol
.
(setf ?)
(setf expander).
?
(generic function).
copy
(generic function).
(setf generic-elt)
(setf expander).
generic-elt
(generic function).
generic-elt-error
(condition).
generic-elt-error-key
(generic reader).
(setf generic-elt-error-key)
(generic writer).
generic-elt-error-obj
(generic reader).
(setf generic-elt-error-obj)
(generic writer).
(setf smart-slot-value)
(setf expander).
smart-slot-value
(generic function).
tally
(generic function).
adding-smart-slot-methods
(macro).
generic-setf
(generic function).
smart-set-slot-value
(generic function).
rutils.misc
Assorted small utilities.
common-lisp
.
rutils.readtable
.
rutils.symbol
.
->
(macro).
->>
(macro).
2nd
(macro).
<-
(macro).
=>
(macro).
and2
(function).
case-failure
(condition).
coercef
(macro).
cswitch
(macro).
dcase
(macro).
dccase
(macro).
decase
(macro).
eswitch
(macro).
fn
(macro).
less
(function).
more
(function).
multiple-value-prog2
(macro).
named-lambda
(macro).
not-less
(function).
not-more
(function).
once-only
(macro).
or2
(function).
pcase
(macro).
pccase
(macro).
pecase
(macro).
re-setf
(macro).
switch
(macro).
true
(function).
void
(macro).
xor
(macro).
xor2
(function).
case-failure-name
(generic reader).
case-failure-possibilities
(generic reader).
expand-destructuring-case
(function).
expand-predicate-case
(function).
extract-function-name
(function).
generate-switch-body
(function).
rutils.sequence
Sequence utilities, including SPLIT-SEQUENCE.
common-lisp
.
rutils.array
.
rutils.hash-table
.
rutils.list
.
rutils.misc
.
rutils.readtable
.
rutils.symbol
.
deletef
(macro).
doindex
(macro).
emptyp
(function).
equal-lengths
(compiler macro).
equal-lengths
(function).
group
(function).
keep
(function).
keep-if
(function).
keep-if-not
(function).
last-elt
(function).
(setf last-elt)
(function).
length=
(function).
map*
(function).
nshuffle
(function).
partition-with
(function).
product
(function).
removef
(macro).
rotate
(function).
safe-sort
(function).
shuffle
(function).
split
(function).
split-if
(function).
split-if-not
(function).
split-sequence
(function).
split-sequence-if
(function).
split-sequence-if-not
(function).
sum
(function).
delete/swapped-arguments
(function).
remove/swapped-arguments
(function).
rotate-head-to-tail
(function).
rotate-tail-to-head
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Default optimization settings for RUTILS.
Current version of Iterate.
Threads the expr through FORMS. Inserts X as the
second item in the first form, or in place of % if it is present in the form,
making a list of it if it is not a list already.
If there are more forms, inserts the first form
as the second item in second form, etc.
Threads the expr through FORMS. Inserts X as the
last item in the first form, or in place of % if it is present in the form,
making a list of it if it is not a list already.
If there are more forms, inserts the first form
as the last item in second form, etc.
(NTH-VALUE 1 FORM)
Apply FN in-place to PLACE.
Function composition of FN1, FN2 and all the other FNS.
Like AND. IT is bound to the value of the previous AND form.
Abbreviate LONG macro or function name as SHORT.
If LAMBDA-LIST is present, also copy appropriate SETF-expander.
Like COND. IT is bound to the passed COND test.
Like DOWHILE. IT is bound to TEST.
Like IF. IT is bound to TEST.
Like AND. VAR will be bound to the value of the previous AND form
Like AND. IT is bound to the value of the previous AND form.
Like AND. VAR will be bound to the value of the previous AND form
Modify-macro for APPEND. Appends LISTS to the place designated by the first argument.
Like WHEN. IT is bound to TEST.
Bind variables from BINDINGS to be active inside BODY, as if by LET*, combined with MULTIPLE-VALUE-BIND, DESTRUCTURING-BIND and other -bind forms, depending on the type of the first argument.
Modify-macro for COERCE.
Like COND. VAR will be bound to the passed COND test.
Like COND. IT is bound to the passed COND test.
Like COND. VAR will be bound to the passed COND test.
Like SWITCH, but signals a continuable error if no key matches.
DCASE is a combination of CASE and DESTRUCTURING-BIND.
KEYFORM must evaluate to a CONS.
Clauses are of the form:
((CASE-KEYS . DESTRUCTURING-LAMBDA-LIST) FORM*)
The clause whose CASE-KEYS matches CAR of KEY, as if by CASE,
is selected, and FORMs are then executed with CDR of KEY is destructured and
bound by the DESTRUCTURING-LAMBDA-LIST.
DCCASE is a combination of CCASE and DESTRUCTURING-BIND.
KEYFORM must evaluate to a CONS.
Clauses are of the form:
((CASE-KEYS . DESTRUCTURING-LAMBDA-LIST) FORM*)
The clause whose CASE-KEYS matches CAR of KEY, as if by CCASE,
is selected, and FORMs are then executed with CDR of KEY is destructured and
bound by the DESTRUCTURING-LAMBDA-LIST.
DECASE is a combination of ECASE and DESTRUCTURING-BIND.
KEYFORM must evaluate to a CONS.
Clauses are of the form:
((CASE-KEYS . DESTRUCTURING-LAMBDA-LIST) FORM*)
The clause whose CASE-KEYS matches CAR of KEY, as if by ECASE,
is selected, and FORMs are then executed with CDR of KEY is destructured and
bound by the DESTRUCTURING-LAMBDA-LIST.
Macro for defining iterate clauses (with DEFUN).
Macro for for defining (with DEFUN) iterators, which may also be used as generators.
A simple way to define a FOR-like &sequence clause.
Macro for defining iterate clauses (with DEFMACRO).
Macro for for defining iterators (with DEFMACRO), which may also be used as generators.
Define a parameter that is not normally changed by the program, but that may be changed without causing an error. Declare the variable special and sets its value to VAL, overwriting any previous value. The third argument is an optional documentation string for the parameter.
defparameter
.
Modify-macro for DELETE. Sets place designated by the first argument to the result of calling DELETE with ITEM, place, and the REMOVE-KEYWORDS.
Iterates over a sequence while keeping track of an index. A DO-style macro.
Example usage:
CL-USER> (doindex (i e ’(a b c))
(format T "~&~S ~S" i e))
1 a
2 b
3 c
Like DOLIST but iterates over key-value pairs (K V) in anything, that can be
viewed as a KV (hash-table, alist, plist, object).
Autodeclares variables named _ as ignored.
Iterate over each leaf NODE of the TREE in depth-first order. Optionally return RESULT.
Iterate over each LINE in SRC (a stream or path to a file) as in DOLIST.
Like DOLIST but iterate over 2 items of the PLIST at once, onsidered KEY and VAL. Asserts proper PLIST.
Like DOLIST but iterates over key-value pairs (K V) in anything, that can be
viewed as a table (hash-table, alist, plist, object).
Autodeclares variables named _ as ignored.
Iterate over each SUBTREE of the TREE in depth-first order. Optionally return RESULT.
Iterates over a vector (like in DOLIST).
Like DOWHILE. VAR will be bound to TEST.
Like DOWHILE. IT is bound to TEST.
Like DOWHILE. VAR will be bound to TEST.
Bind the variables in LAMBDA-LIST to the corresponding values in the tree structure resulting from the evaluation of EXPRESSION.
destructuring-bind
.
Destructuring assignment; supports both (VALUES ...) for destructuring a multiple-value form and NIL as a variable name, meaning to ignore that position, e.g. (DSETQ (VALUES (A . B) NIL C) FORM).
Like SWITCH, but signals an error if no key matches.
Wrap BODY in eval-when with all keys (compile, load and execute) mentioned.
An abbreviation for LABELS.
Expands into a lambda-expression within whose BODY NAME denotes the corresponding function.
Either get the value from TABLE by KEY or set a new calculated NEW-VALUE
there and return it.
It’s similar to GETHASH called with 3 parameteres, but functions lazily.
Either get the value from TABLE by KEY or set a new calculated NEW-VALUE
there and return it.
It’s similar to GETHASH called with 3 parameteres, but functions lazily.
Like IF. VAR will be bound to TEST.
Like IF. IT is bound to TEST.
Like IF. VAR will be bound to TEST.
Jonathan Amsterdam’s powerful and extensible iteration facility, providing multiple accumulation, generators, memory of previous iterations, over 50 clauses to start with and a Lisp-like syntax. Evaluate (iter:display-iter-clauses) for an overview of clauses.
A typecase-like macro to destinguish between 3 possible kinds of LIST:
simple lists, alists, and dlists.
Evaluates the appropriate key-form depending on the kind:
ALIST, DLIST or simple list (T).
Evaluates FIRST-FORM, then SECOND-FORM, and then FORMS. Yields as its value all the value returned by SECOND-FORM.
multiple-value-bind
.
Expands into a lambda-expression within whose BODY NAME denotes the corresponding function.
Modify-macro for NCONC. Concatenates LISTS to place designated by the first argument.
Modify-macro for NREVERSE. Reverses the list stored in the given place by destructively modifying it and saves back the result into the place.
Modify-macro for NUNION. Saves the union of LIST and the contents of the place designated by the first argument to the designated place. May modify either argument.
Evaluate FORMS with names rebound to temporary variables, ensuring
that each is evaluated only once.
Each SPEC must be either a NAME, or a (NAME INITFORM), with plain
NAME using the named variable as initform.
Example:
CL-USER> (defmacro cons1 (x)
(once-only (x)
‘(cons ,x ,x)))
CL-USER> (let ((y 0))
(cons1 (incf y)))
(1 . 1)
Like CASE, but uses given PRED instead of EQL to select appropriate CLAUSE.
Example usage:
CL-USER> (pcase ’< 1
(0 (print "Below zero"))
(2 (print "OK"))
(otherwise (error "Oops")))
Like CCASE, but uses given PRED instead of EQL to select appropriate CLAUSE.
Example usage:
CL-USER> (pccase ’< 1
(0 (print "Below zero"))
(2 (print "OK")))
Like ECASE, but uses given PRED instead of EQL to select appropriate CLAUSE.
Example usage:
CL-USER> (pecase ’< 1
(0 (print "Below zero"))
(2 (print "OK")))
SETFs VAR to the value of each clause subsequently. Re-uses the new value of VAR in subsequent clauses. Expects VAR to be a valid place for SETF.
Modify-macro for REMOVE. Sets place designated by the first argument to the result of calling REMOVE with ITEM, place, and the REMOVE-KEYWORDS.
Modify-macro for REVERSE. Copies and reverses the list stored in the given place and saves back the result into the place.
Evaluate first matching clause, returning its values, or evaluates and returns the values of DEFAULT if no keys match.
Modify-macro for UNION. Saves the union of LIST and the contents of the place designated by the first argument to the designated place.
Nullify PLACE.
with-input-from-string
.
with-output-to-string
.
Provide gensyms for given NAMES.
Like WHEN. VAR will be bound to TEST.
Like WHEN. IT is bound to TEST.
Like WHEN. VAR will be bound to TEST.
Bind variables from BINDINGS to be active inside BODY, as if by LET*, combined with MULTIPLE-VALUE-BIND, DESTRUCTURING-BIND and other -bind forms, depending on the type of the first argument.
bind
.
Provide gensyms for given NAMES.
Like WITH-ACCESSORS but for pairs in hash-table HT.
A simple list analog of WITH-OUTPUT-TO-STRING, which supports the general pattern of using list as an accumulator. OUT is bound to a fresh list, that will be returned nreversed. BODY is wraped in implicit block NIL.
Bind LT and RT to PAIR’s slots and execute BODY inside.
Provide gensyms for given NAMES.
Evaluates the ARGS one at a time. If more than one is T, evaluation stops and NIL is returned. If exactly one arg is T, that value is returned.
?
(generic function).
generic-setf
(generic function).
generic-elt
(generic function).
generic-setf
(generic function).
get#
(function).
smart-slot-value
(generic function).
smart-set-slot-value
(generic function).
Literal syntax for raw strings (which don’t need escapin of control chars).
Example:
CL-USER> #/This is a "test" string/#
"This is a \"test\" string"
;; here " are actually unescaped, but you can’t write it in a docstring :)
Literal syntax for zero/one/two argument lambdas.
Use % as the function’s argument, %% as the second.
Examples:
- #‘(+ 2 %) => (lambda (&optional x y) (+ 2 x))
- #‘((print %) (1+ %)) => (lambda (&optional x) (print x) (1+ x))
- #‘(+ 1 2) => (lambda (&optional x y) (+ 1 2))
- #‘(+ % %%) => (lambda (&optional x y) (+ x y))
Literal syntax for hash-tables.
Examples:
CL-USER> #h(:a 1 :b 2)
#<HASH-TABLE :TEST EQL :COUNT 2>
;; holding 2 key/value pairs: ((:a . 1) (:b . 2))
CL-USER> #h(equalp "a" 1 "b" 2)
#<HASH-TABLE :TEST EQUALP :COUNT 2>
;; holding 2 key/value pairs: (("a" . 1) ...)
Literal syntax for vectors.
Unlike #() evaluates its contents before vector creation
Examples:
CL-USER> #v(1 2 3)
#(1 2 3)
CL-USER> #v((+ 1 2))
#(3)
Literal syntax for fixed-size hash-tables.
Examples:
CL-USER> #{:a 1 :b 2}
#<HASH-TABLE :TEST EQL :COUNT 2>
;; holding 2 key/value pairs: ((:a . 1) (:b . 2))
CL-USER> #{equalp "a" 1 "b" 2}
#<HASH-TABLE :TEST EQUALP :COUNT 2>
;; holding 2 key/value pairs: (("a" . 1) ...)
Short slot and sequence elements access syntax.
Examples:
CL-USER> (defclass foo () ((bar :initform 42)))
CL-USER> (defvar *foo* (make ’foo))
CL-USER> @*foo*.bar
42
CL-USER> (defvar *baz* #(1 *foo*))
CL-USER> @*baz*#1.bar
42
Add ITEM to hash-set SET.
Returns a hash-table containing the keys and values, alternating in ALIST. Hash table is initialized using the HASH-TABLE-INITARGS.
Make a plist from an alist ALIST.
Test wheather LIST is a properly formed alist.
AND for 2 arguments as a function.
Return a value in ALIST, whose key is eql to ITEM. Also as 2nd value return, whether ITEM was found. If there is no such entry, returns DEFAULT. The usual KEY, TEST and TEST-NOT arguments apply.
Test whether a STRING is blank (empty).
Split LIST in 2 parts and return them as multiple values:
head and tail. If (= N 1), which is the most common case,
the tail will be a single element, otherwise – a list as well.
Call FUNCTION with the given ARGUMENTS.
funcall
.
CONCATENATE all the LISTS into a single list.
Create a fresh copy of the array ARR.
Returns a copy of hash table HT, with the same keys and values.
The copy has the same properties as the original, unless overridden
by the keyword arguments.
Before each of the original values is set into the new hash-table,
KEY is invoked on the value. As KEY defaults to IDENTITY
a shallow copy is returned by default.
Add KEY-VAL pair to the front of DLIST.
Just like REMOVE-FROM-PLIST, but this version may destructively modify the provided PLIST.
Set difference between hash-sets SET1 & SET2.
Display ITERATE clause.
Test wheather LIST is a properly formed dlist, i.e. a list-structure of the form: ((keys) vals).
Test wheather LIST contains exactly 2 elements.
Returns true if SEQUENCE is an empty sequence. Signals an error if SEQUENCE is not a sequence.
Test wether a hash-set is empty
Test, whether STRING ends with SUFFIX. Accepts TEST. If -END is provided matches from this offset from end.
Make a keyword from OBJ according to FORMAT.
Wrap OBJ in a list, if it’s not a list.
Make a symbol in either PACKAGE or *PACKAGE* from OBJ according to FORMAT.
Takes any number of sequences or integers in any order. Returns true iff
the length of all the sequences and the integers are equal.
Hint: there’s a compiler macro that expands into more efficient code
if the first argument is a literal integer.
Apply FUNCTION to respective elements of each LIST, appending all the result lists to a single list. FUNCTION must return a list.
Flatten possibly nested LIST a given number of LEVELs (or to the end).
(FORMAT NIL FORMAT-STRING ARGS)
Finds the entry in HASH-TABLE whose key is KEY and returns the associated value and T as multiple values, or returns DEFAULT and NIL if there is no such entry. Entries can be added using SETF.
gethash
.
Split SEQ into a list of sequences of the same type of length N (the last sequence may be shorter).
Create a hash-set with a given TEST and initial contents ITEMS.
Returns a hash-table containing the keys and values, alternating in ALIST. Hash table is initialized using the HASH-TABLE-INITARGS.
Returns a hash-table containing the keys and values, alternating in PLIST. Hash table is initialized using the HASH-TABLE-INITARGS.
Return a list of keys of hash-table HT.
Returns an alist containing the keys and values of hash-table HT.
Returns a list containing the keys and values of hash-table HT.
Return a list of values of hash-table HT.
Returns an alist containing the keys and values of hash-table HT.
Dump hash-table HT to list of pairs.
Returns a list containing the keys and values of hash-table HT.
Return the number of entries in the given HASH-TABLE.
hash-table-count
.
Return a list of keys of hash-table HT.
Return a list of values of hash-table HT.
Check if KEY is present in HASH-TABLE.
Set intersection between hash-sets SET1 & SET2.
Return a list whose elements are taken from LIST and each of LISTS like this: 1st of list, 1st of 1st of lists,..., 1st of last of lists, 2nd of list,...
Returns a sequence of the elements of SEQUENCE separated by SEPARATOR.
This function simply returns what was passed to it.
identity
.
The opposite of REMOVE.
Return a copy of sequence with elements not satisfying PREDICATE removed.
remove-if-not
.
Return a copy of sequence with elements satisfying PREDICATE removed.
remove-if
.
Return the last character of STRING if it’s not empty, otherwise - nil.
Returns the last element of SEQUENCE.
Signals a type-error if SEQUENCE is not a proper sequence,
or is an empty sequence.
Sets the last element of SEQUENCE.
Signals a type-error if SEQUENCE is not a proper sequence,
is an empty sequence.
Get the N-th element of LIST from end, starting from the last one (which is number 1).
Return true if SEQUENCE’s length equals LENGTH.
Returns FALSE for circular lists.
Signals an error if SEQUENCE is not a sequence.
Like <, but works for NIL values of X and Y.
Obviously, NIL is LESS, than anything, including itself.
If form is a macro (or symbol macro), expand it once. Return two values, the expanded form and a T-or-NIL flag indicating whether the form was, in fact, a macro. ENV is the lexical environment to expand in, which defaults to the null environment.
macroexpand-1
.
Return a list of LENGTH gensyms, using the second (optional, defaulting to ’G’) argument.
DWIM version of map that uses the type of first sequence (SEQ) for result.
Mapcan FN with 2 lists:
- numeric inidices for LIST, starting from 0
- LIST itself
Apply FUNCTION to respective elements of each LIST, appending all the result lists to a single list. FUNCTION must return a list.
Mapcar FN with 2 lists:
- numeric inidices for LIST, starting from 0
- LIST itself
Map a one-argument function FN over each leaf node of the TREE
in depth-first order, returning a new tree with the same structure.
Apply FUNCTION to respective elements of each LIST, appending all the result lists to a single list. FUNCTION must return a list.
Map FN with number range from 0 to TIMES (exclusive).
Map a one-argument function FN over each subtree of the TREE
in depth-first order, returning a new tree with the same structure.
From 1 or more HTS create a single one with TEST of HT.
From 1 or more HTS create a single one with TEST of HT
and values created by calling FN (a two-argument function that should
be prepared to accept nil values when some keys are not present in all
hash-tables) with all the values from HT & HTS for a particular key.
From 1 or more HTS create a single one with TEST of HT.
From 1 or more HTS create a single one with TEST of HT
and values created by calling FN (a two-argument function that should
be prepared to accept nil values when some keys are not present in all
hash-tables) with all the values from HT & HTS for a particular key.
Make a keyword from OBJ according to FORMAT.
Wrap OBJ in a list, if it’s not a list.
Make a symbol in either PACKAGE or *PACKAGE* from OBJ according to FORMAT.
Like >, but works for NIL values of X and Y.
Obviously, NIL is not MORE, than anything, including itself.
Like >=, but works for NIL values of X and Y.
Obviously, NIL is not NOT-LESS, than anything, including itself.
Like <=, but works for NIL values of X and Y.
Obviously, NIL is NOT-MORE, than anything, including itself.
Shuffle SEQUENCE (in bounds of START and END) in-place.
OR for 2 arguments as a function.
Pretty print hash-table HT to STREAM.
List all symbols in a PACKAGE.
List all symbols in a PACKAGE that are not imported.
List all symbols in a PACKAGE.
A shortcut to make a pair of X and Y.
Create hash-table from the list of PAIRS.
Hash table is initialized using the HASH-TABLE-INITARGS.
Partition a SEQUENCE into a sequence of sequences, each one related
by TEST to one key in KEY-SEQUENCE (which may be already sorted: KEYS-SORTED).
Returns a sorted KEY-SEQUENCE as a 2nd value.
Return values are coerced to RESULT-TYPE, that should be a sequence subtype
(default is LIST).
ORDERING is used for sorting both SEQUENCE and KEY-SEQUENCE.
Accepts KEY.
Generate all permutations of LIST. Complexity: O(n!)
Returns a hash-table containing the keys and values, alternating in PLIST. Hash table is initialized using the HASH-TABLE-INITARGS.
Make an alist from a plist PLIST.
Test wheather LIST is a properly formed plist.
Pretty print hash-table HT to STREAM.
Pretty print hash-table HT to STREAM.
Product of the results of mapping FN to SEQ and other SEQS.
vector-push-extend
.
Return a list of numbers, starting from START up to LIMIT incremented by STEP (default 1).
Make the exported symbols in FROM-PACKAGE be also exported from TO-PACKAGE.
Read a whole file by FILENAME into a string.
Remove the entry in HASH-TABLE associated with KEY. Return T if there was such an entry, or NIL if not.
remhash
.
Returns a propery-list with same keys and values as PLIST,
except that keys in the list designated by KEYS and values,
corresponding to them are removed. The returned property-list may share
structure with the PLIST, but PLIST is not destructively modified.
Keys are compared using EQ.
Return a copy of the list without IDX-th element.
Returns a sequence of the same type as SEQUENCE, with the elements of
SEQUENCE rotated by N: N elements are moved from the end of the sequence to
the front if N is positive, and -N elements moved from the front to the end
if N is negative. SEQUENCE must be a proper sequence. N must be an integer,
defaulting to 1.
If absolute value of N is greater then the length of the sequence, the results
are identical to calling ROTATE with
(* (signum n) (mod n (length sequence))).
Note: the original sequence may be destructively altered,
and result sequence may share structure with it.
The destructuve nature of SORT triggers many obscure bugs. This function is a thin wrapper over SORT that enqures that an input SEQUENCE is copied.
Set VAL at KEY in hash-table HT.
Return true if every element of LIST1 matches some element of LIST2 and
every element of LIST2 matches some element of LIST1. Otherwise returns false.
Set VAL at KEY in hash-table HT.
Return a shuffled copy of SEQUENCE (in bounds of START and END).
Test wheather LIST contains exactly 1 element.
Return an array-slice into VEC from BEG to END.
If VEC is already a displaced array, recursively ascend to the original
non-displaced array and create a slice into it
(to avoid multiple levels of indirection).
Read a whole file by FILENAME into a string.
Return a list of subsequences in SEQ delimited by DELIMITER.
If REMOVE-EMPTY-SUBSEQS is NIL, empty subsequences will
be included in the result; otherwise they will be discarded.
All other keywords work analogously to those for SUBSTITUTE.
In particular, the behavior of FROM-END is possibly different
from other versions of this function; FROM-END values of NIL
and T are equivalent unless COUNT is supplied. The second return
value is an index suitable as an argument to SUBSEQ into the
sequence indicating where processing stopped.
Return a list of subsequences in SEQ delimited by items, satisfying PREDICATE.
If REMOVE-EMPTY-SUBSEQS is NIL, empty subsequences will be included in the
result; otherwise they will be discarded. All other keywords work analogously
to those for SUBSTITUTE. In particular, the behavior of FROM-END is possibly
different from other versions of this function; FROM-END values of NIL
and T are equivalent unless COUNT is supplied. The second return value is
an index suitable as an argument to SUBSEQ into the sequence indicating where
processing stopped.
Return a list of subsequences in SEQ delimited by items, satisfying
(complement PREDICATE).
If REMOVE-EMPTY-SUBSEQS is NIL, empty subsequences will be
included in the result; otherwise they will be discarded. All other
keywords work analogously to those for SUBSTITUTE.
In particular, the behavior of FROM-END is possibly different
from other versions of this function; FROM-END values of NIL
and T are equivalent unless COUNT is supplied. The second return
value is an index suitable as an argument to SUBSEQ into the
sequence indicating where processing stopped.
Return a list of subsequences in SEQ delimited by DELIMITER.
If REMOVE-EMPTY-SUBSEQS is NIL, empty subsequences will
be included in the result; otherwise they will be discarded.
All other keywords work analogously to those for SUBSTITUTE.
In particular, the behavior of FROM-END is possibly different
from other versions of this function; FROM-END values of NIL
and T are equivalent unless COUNT is supplied. The second return
value is an index suitable as an argument to SUBSEQ into the
sequence indicating where processing stopped.
Return a list of subsequences in SEQ delimited by items, satisfying PREDICATE.
If REMOVE-EMPTY-SUBSEQS is NIL, empty subsequences will be included in the
result; otherwise they will be discarded. All other keywords work analogously
to those for SUBSTITUTE. In particular, the behavior of FROM-END is possibly
different from other versions of this function; FROM-END values of NIL
and T are equivalent unless COUNT is supplied. The second return value is
an index suitable as an argument to SUBSEQ into the sequence indicating where
processing stopped.
Return a list of subsequences in SEQ delimited by items, satisfying
(complement PREDICATE).
If REMOVE-EMPTY-SUBSEQS is NIL, empty subsequences will be
included in the result; otherwise they will be discarded. All other
keywords work analogously to those for SUBSTITUTE.
In particular, the behavior of FROM-END is possibly different
from other versions of this function; FROM-END values of NIL
and T are equivalent unless COUNT is supplied. The second return
value is an index suitable as an argument to SUBSEQ into the
sequence indicating where processing stopped.
Split STRING by WHITE-CHAR-P.
Test, whether STRING starts with PREFIX.
If START is provided matches from this offset from the start.
CONCATENATE all the strings in STRING-DESIGNATORS.
Join STRINGS with DELIM.
Return a copy of a subsequence of SEQUENCE starting with element number START and continuing to the end of SEQUENCE or the optional END.
subseq
.
Efficient substring of STRING from START to END (optional), where both can be negative, which means counting from the end.
Sum the results of mapping FN to SEQ and other SEQS.
Return a list with N elements, which are taken from LIST by this formula: INDEX of ELEMENT = I * STEP for I from 0
Get and remove VAL at KEY in hash-table HT.
Get and remove VAL at KEY in hash-table HT.
Toggles printing hash-tables with PRINT-HASH-TABLE or with default method. If ON is set explicitly will turn on literal printing (T) or default (NIL).
Returns the length of the largest of nodes from the root tree.
Returns the number of nodes (internal & external) in the indicated TREE.
The complement to NULL.
Unlike IDENTITY will return T if VAL is not NIL.
Test wheather LIST contains exactly 3 elements.
Set union between hash-sets SET1 & SET2.
Make a new adjustable vector with ARGS as contents.
Is CHAR a whitespace character (newline chars are also considered white).
Set xor between hash-sets SET1 & SET2.
XOR for 2 arguments as a function.
Return a single list whose elements are lists of the consecutive elements of LISTS, until one of the LISTS ends.
Return a single list whose elements are lists of the consecutive elements of LISTS, until all of the LISTS end.
Return a single list whose elements are the results
of applying FN to groups of the consecutive elements of LISTS,
until all of the LISTS end.
Return a single list whose elements are the results
of applying FN to groups of the consecutive elements of LISTS,
until one of the LISTS ends.
Generic element access in OBJ by KEY. Supports chaining with KEYS.
symbol
) arg2 &rest args) ¶list
) (arg2 (eql rutils.generic:?)
) &rest args) ¶list
) (arg2 (eql rutils.readtable::@)
) &rest args) ¶list
) arg2 &rest args) ¶vector
) arg2 &rest args) ¶Create a shallow copy of an object.
If KVS are specified, they may be used to update the relevant parts
(like slots of an object, keys in a hash-table
or indexed elements of a sequence).
Return an equality test predicate of the KV.
Generic element access in OBJ by KEY. Supports chaining with KEYS.
(eql nil)
) key &rest keys) ¶standard-object
) key &rest keys) ¶structure-object
) key &rest keys) ¶hash-table
) key &rest keys) ¶sequence
) key &rest keys) ¶array
) (key list
) &rest keys) ¶vector
) key &rest keys) ¶list
) key &rest keys) ¶generic-elt-error
)) ¶generic-elt-error
)) ¶key
.
generic-elt-error
)) ¶generic-elt-error
)) ¶obj
.
Return a list of all keys in a KV. Order is unspecified.
Return a list of all key-value pairs in a KV in one the 3 kinds:
- list of pairs (default)
- alist
- dlist
Order is unspecified.
make-instance
.
Like MAPCAR but for a data structure that can be viewed as a KV.
Return a list of all key-value PAIRS in a TABLE. Order is unspecified.
Similar to SLOT-VALUE but tries to find slot definitions regardless of the package.
Return the count of items in a collection or other compound object.
Return a list of all values in a KV. Order is unspecified.
simple-condition
.
style-warning
.
Type designator for an index into array of LENGTH: an integer between
0 (inclusive) and LENGTH (exclusive).
LENGTH defaults to ARRAY-DIMENSION-LIMIT.
Type designator for a dimension of an array of LENGTH: an integer between
0 (inclusive) and LENGTH (inclusive).
LENGTH defaults to ARRAY-DIMENSION-LIMIT.
A string designator type. It is either a string, a symbol, or a character.
This is how we get multiple accumulations into the same variable
to come out right. See MAKE-ACCUM-VAR-BINDING.
It’s an alist of (ACCUM-VAR KIND <possibly other info>).
The currently used kinds are:
* :collect - for collect, nconc, append, etc.
* :increment - for count, sum and multiply
* :max - for maximize
* :min - for minimize
* :if-exists - for always/never/thereis and finding such-that
Note that we do not check for type conflict in the re-use of these variables.
Like (declare (declare-variables))
List of gensymed symbols that should be declared ignored for bind.
For the use of MAKE-BINDING-INTERNAL, to pass back bindings. (:IF FIRST-TIME) also uses it to create first-time variables.
Name of the block for this iterate /> form. Used in generating return statements
*CLAUSE*> is bound to each entire iterate clause before the clause is processed. Mostly for error output (see CLAUSE-ERROR class).
The index of standard clauses (a discrimination tree). This is a DEFVAR, so that reloading doesn’t clobber existing defs (though it will clobber those clauses, that are defined in this file).
*DECLARATION-CONTEXT?* is bound to T inside a form, that allows declarations, like (FLET, LABELS).
For functions (like MAKE-BINDING), that don’t want to or can’t pass declarations normally. These are really decl-specs, not full declarations.
*DECLARE-VARIABLES* is bound to T if (declare (iterate:declare-variables))
was seen at top-level, or if *ALWAYS-DECLARE-VARIABLES* is non-nil.
This indicates, that variables, that haven’t been declared by the user should be
declared to have the appropriate types. What ’appropriate’ means depends
on the context.
Global collection of declaration forms.
List of info about drivers for use by the NEXT mechanism.
Environment, for MACROEXPAND.
Global collection of final forms.
Global collection of final forms, protected by UNWIND-PROTECT.
Counter of GENVAR’s.
Global collection of initial forms.
This is a list of lists, containing the variables, made by internal LETs or
other binding forms. It is used to check for the error of having iterate try to
bind one of these variables at top-level. E.g. this code is an error.
CL-USER> (iter (:for i :from 1 :to 10)
(let ((a nil))
(:collect i :into a)))
This is so the advanced user can choose how the end of a list
is checked for.
There are three choices for termination predicate in
FOR...ON and FOR...IN, differing in their behavior on lists with a non-nil cdr:
* NULL: If lucky, will get an error when taking the cdr. Bad choice
* ATOM: Will terminate correctly with no error
* ENDP: Will give an appropriate error message
Things that we should wrap the loop’s body in.
A loop label.
Whether a label was used already (to avoid generating them)?
This is so we don’t get a warning from compilers that check for unused tags.
A loop label.
Whether a label was used already (to avoid generating them)?
This is so we don’t get a warning from compilers that check for unused tags.
A loop label.
Used by PREVIOUS.
*RESULT-VAR* is bound to a gensym before the clauses of an iterate form are processed. In the generated code, the gensym is bound to NIL before any other bindings are performed. Clauses are free to generate code that sets the value of *RESULT-VAR*.
Shared variables created by MAKE-SHARED-BINDING.
It’s an alist of (NAME GENSYM-VAR <possibly other info>).
Tipical use is FIRST-ITERATION-P.
Clauses, that are ’special’ in the sense, that they don’t conform to the keyword-argument syntax of Iterate clauses
An alist of lisp special forms and the functions for handling them. nil as function means leave form as-is
Global collection of stepping forms.
These two are for conserving temporaries. *TEMPS* is a list
of temporaries that have already been created and given bindings.
*TEMPS-IN-USE* is a list of temporaries that are currently being used.
See WITH-TEMPORARY, WITH-TEMPORARIES.
This seems to stem from a time where it was more efficient to use
CL-USER> (progn (temp)
...
(setq temp #) ; somewhere deep inside the body
(foo temp)
(bar temp)
...)
than using a local LET deep inside that body, as in
CL-USER> (tagbody ...
(let ((temp #))
(foo temp)
(bar temp))
...)
which may be easier for compiler data flow and lifetime analysis.
These two are for conserving temporaries. *TEMPS* is a list
of temporaries that have already been created and given bindings.
*TEMPS-IN-USE* is a list of temporaries that are currently being used.
See WITH-TEMPORARY, WITH-TEMPORARIES.
This seems to stem from a time where it was more efficient to use
CL-USER> (progn (temp)
...
(setq temp #) ; somewhere deep inside the body
(foo temp)
(bar temp)
...)
than using a local LET deep inside that body, as in
CL-USER> (tagbody ...
(let ((temp #))
(foo temp)
(bar temp))
...)
which may be easier for compiler data flow and lifetime analysis.
*TOP-LEVEL?* is bound to T at top-level (i.e. before any forms, that contain clauses inside them, like IF, LET etc.) and to NIL inside such forms. It is useful to ensure, that certain forms (particularly iteration drivers) occur only at top-level.
Iterate binds *TYPE-ALIST* to an alist of variables and
their types before processing clauses. It does this by looking at
(declare (type ...)) forms in the clauses and recording
the information there. (Only variable type information, not function)
Keywords, used in sequence iteration clauses.
Table 4-1 of the Common Lisp Manual
Add STUFF to the end of VAR list.
ITER over symbols accessible in package PKG.
Define clause by DEFUN. Special-clause names should be exported.
Set SYNONYM for a SYMBOL.
Add STUFF to the beginning of VAR list.
Execute BODY iside the temporary binding of VAR to.
Literal syntax for zero/one/two argument lambdas.
Use % as the function’s argument, %% as the second.
Examples:
- ^(+ 2 %) => (lambda (&optional x y) (+ 2 x))
- ^((print %) (1+ %)) => (lambda (&optional x) (print x) (1+ x))
- ^(+ 1 2) => (lambda (&optional x y) (+ 1 2))
- ^(+ % %%) => (lambda (&optional x y) (+ x y))
Return a list of VAR, CONS’ed at the front to *INTERNAL-VARIABLES*.
Return a list of VARS, NCONC’ed at the front to *INTERNAL-VARIABLES*. VARS can be a lambda-list, a list of LET bindings, or a list of variables.
Ad a WRAPPER to *LOOP-BODY-WRAPPERS*, if it’s not already there.
When FORMS is more than one form, cons the PROGN in.
FORMS to execute after each iteration.
Check CI1 pair for being already present in the alist inside INDEX with the subset of required keywors.
Test wheather required-keywords of CI1 are a prefix of required-keywords of CI2 (i.e. introduce ambiguity).
Apply a function, defined for ITERATE clause FUNC to ARGS.
Make sure that each keyword in ITERATE CLAUSE is in INFO.
Signal an Iterate bug to *ERROR-OUTPUT*.
Generalized accumulation.
Adjoin into a list (tests for membership first).
Return last value, when EXPR is always non-NIL.
APPEND into a list.
Collect into a list (with CONS).
Increment VAR if EXPR is non-NIL.
ERROR of improper use of iterate.
Return value, which maximizes EXPR.
Return value, which minimizes EXPR.
Return EXPR, when test is non-NIL.
General FOR clause.
Set VAR on each iteration.
General driver; VAR must be set in DO-NEXT.
Set VAR on first, and then on subsequent iterations.
ITER over elements of LIST.
ITER over forms from a file by FILENAME (which will be closed at the end).
ITER over elements and keys of a hash-table TABLE.
ITER over symbols and their access-types in packages PKGS.
ITER over elements of a sequence.
ITER over forms from a STREAM (which will be closed at the end).
ITER over characters of a string.
ITER over elements of a vector.
Indices of a sequence (vector or list).
Indices of a string.
Indices of a vector.
Set VAR initially, then on subsequent iterations.
General driver; VAR is set to value of NEXT.
ITER over sublists of LIST.
Previous value of a variable.
Test wheather CLAUSE-SPEC matches KWS. If no CLAUSE-SPEC is given, assume, that it matches.
Maximize value of an EXPR.
Minimize value of an EXPR.
Multiply into VAR.
NCONC into a list.
Return T, when expression is never non-NIL.
Union into a LIST, destructively.
Generalized reduction.
Repeat the loop N times.
Sum into VAR.
Return value of EXPR, as soon as it is non-NIL.
Union into a LIST.
Exit loop, when EXPR is non-NIL.
WARN of some improper use of ITERATE.
Exit loop, when EXPR is NIL.
Bind VAR.
Test, wheather X is a constant.
This differs from CONSTANTP in that it doesn’t acknowledge DEFCONSTANTs to be constants; the problem with so acknowledging them is that the run-time and compile-time environments may differ. The things CONSTANT? returns for are really and truly constant everywhere.
Check, wheather LST contains duplicate symbols.
Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.
copy-seq
.
Default code, that will be executed if no drivers are defined.
Display standard (i.e. defined in ITER) clauses.
Display a single ITERATE clause with a DOCSTRING, which accepts keywords KWS.
Display ITERATE clause keywords KWS.
Examine TEMPLATE and if it’s a proper VAR-SPEC?, bind its var to VALUE.
The name speaks for itself.
used
.
Signal an ERROR in DSETQ.
Return T if X can be copied in code. This is true for symbols,
on the assumption that the copies are close enough to each other so that
updating the variable cannot occur.
FORMS to execute if the loop is never entered.
Useful for macros that want to mimic the functional interface for functions like #’eq and ’eq.
Extract variable from THE-declaration or return as is.
Like EXTRACT-VAR, but will work with a destructuring template as well. Returns a list of variables.
FORMS to execute after loop ends.
FORMS to execute in an UNWIND-PROTECT after loop ends.
Exit the loop gracefully, executing the epilogue.
Return T in the first iteration of the loop.
Return T for the first time it is evaluated.
FSPEC is either:
* a symbol
* or (SETF <symbol>)
* or (<name-or-lambda> (<vars>) . body)
Test, wheather X is of the form (FUNCTION ...) - same as #’(...).
A cross between GENSYM and GENTEMP.
Get ITERATE CLAUSE info from the INDEX.
Return:
1. a form, which evaluates THEN the first time through the loop,
ELSE – the subsequent times
2. the variable, which may be passed with FIRST-TIME-VAR,
that keeps track of first time
Process FORMS in an ITER block with BLOCK-NAME.
Add THING, qualified by KEY to the alits inside INDEX.
Search for ITEM in the alist inside INDEX.
Simple test wheather X is an index list (i.e. starts with :INDEX).
FORMS to execute before loop starts.
For each variable that requires a previous value, get all the update code
for that variable and splice in code that will remember the previous
values for the desired number of iterations. Return code to put in the
init and step sections of the loop.
There are three situations here:
1. Variable has its initial value at the beginning of the loop, or gets
its initial value in a different place than where it is updated. In
this case, we can put the save code just before each update of the
variable. Applicable clauses are: :FOR-PREVIOUS, :FOR-INITIALLY-THEN,
and :FOR-FIRST-THEN. (class :INITIAL)
2. The variable is updated somewhere inside the loop, and the update also
gives it its first value. We use another, internal save variable,
which is set to the variable after each update. This is for :FOR-:= and
driver clauses when :NEXT is used.(class :NEXT)
3. Variable is a driver with no :NEXT. We can put the update in the step
portion of the loop, since we know the update code occurs at the
beginning. (class :STEP)
Note that (3) is really an optimization of (2), and we could perform such an optimization more generally if we could show that a variable in class (2) was always updated before being used. Right now, we don’t bother. *** (3) is no longer done because driver code stays where the driver is. We could try to detect that the driver is at the beginning, but don’t for now.
Put the SYMBOL with DOCSTRING at the end of *SPECIAL-CLAUSE-ALIST*, if not already present.
If VAR already has a previous-info structure, return it;
else create a new one, put it where it belongs, and return it.
Make sure that if VAR is itself a save-var, the new record
goes after the one for VAR’s var, so that the previous code
is generated before it is itself considered update code for another
previous splicing.
Test, if VAR is present in *INTERNAL-VARIABLES*.
Test wheather a CAR of FORM is defined as ITERATE clause.
Test, wheather X is a lambda-expression.
Return the variables in the LAMBDA-LIST, omitting keywords, default and values.
Exit the loop without running the epilogue code.
From a list of clause symbols REQ-SYMS make a unique symbol.
Construct the body for NEXT carefully (avoid backquote), ensuring that CODE, and not a copy, appears in it.
Generate code fro the PREVIOUS mechanism.
Look up in *SHARED-BINDINGS-ALIST* or create an entry, keyed by VAR, store GENSYM in the VALUE and also add it as a binding. Return the entry.
Make a binding for a newly GENVAR’ed variable, denoted by STRING, to the given VALUE. Possibly account for it’s TYPE.
Explicitly step a driver VAR N times. Return VAR, after stepping.
Enclose the returned code in a PROGN, so that the variable reference isn’t confusable with a tag (since the code might appear within a TAGBODY). The PROGN is also necessary, so that spliced-in save code will not result in extra forms, for cases when the NEXT appears as an argument.
Begin the next iteration.
Preprocess ITERATE CLAUSE.
code
.
var
.
Process ITERATE CLAUSE according to the rules, defined for it.
This should observe the invariant, that the forms it returns are already
copied from the original code, hence NCONC-able.
Process top-level declarations, present among CLAUSES.
Sets *TYPE-ALIST* to an alist of (var . type), and sets *DECLARE-VARIABLES* />
to T, when such a declaration was seen.
Transform forms, if more than one is present, and the first is a list: wrap PROGN around. Not copying forms.
Test, wheather X is of the form (QUOTE ...).
Remove clause from the index. It is identified by CLAUSE-KEYWORDS, which is a list with its symbols keywordized.
Call F with STUFF and return the regular 6 values (see WALK) with 1st return value being the result of application of MOD-F to body, returned by F.
Test, wheather X is a self-evaluating entity.
Everything but symbols and lists are self-evaluating since CLtL2. This differs from CONSTANTP in that it returns nil for quoted things and DEFCONSTANT’s.
Check, that SYMBOL is present in *SPECIAL-FORM-ALIST*.
Used instead of SPECIAL-OPERATOR-P, which doesn’t work properly in some
compilers (like Lucid). Besides, to track Iterate special clauses.
Put PREV-CODE in at the first cons cell of CODE, and POST-CODE at the last cons cell. Both PREV-CODE and POST-CODE are single forms.
Split CT into required keywords, optional keywords and values.
Split LST into odd- and even-numbered elements, returned with VALUES.
Tests wheather SYMBOL is defined as an ITERATE clause starting symbol.
A symbol starts a clause, when it appears in the top-level index
*CLAUSE-INFO-INDEX*, in the *SPECIAL-CLAUSE-ALIST*, or it is GENERATE.
This is used to distinguish the case when there’s a lisp form (in which case the
symbol doesn’t start a clause), versus the situation, when an erroneous clause
is provided.
Get SYNONYM for a SYMBOL. When there’s no SYNONYM, return the SYMBOL itself.
Use within FOR...DO-/NEXT to end the iteration.
Test, wheather X is a THE-expression.
Check for being at *TOP-LEVEL?* and signal CLAUSE-ERROR otherwise.
Test, if VAR is present in *BINDINGS*.
Return the declaration, associated with VAR.
Test, if X is a proper specifivation of a variable: a symbol or a THE-declaration.
Return type of VAR, which can be given as THE-declaration or as symbol.
Walk the FORM and return the usual 6 things as multiple-values:
* body
* type declarations
* initializations code
* stepping code
* final code
* final protected (by UNWIND-PROTECT)
Walk ARGS list, possibly containing ITERATE clauses.
Don’t walk the CAR and CADR of a list. CDDR might not be walked as well.
a.k.a. walk-locally
Walk CDDR, ignoring declarations, that might be present in it.
Set *TOP-LEVEL?* to NIL (via WALK-ARGLIST). Note that when *TOP-LEVEL?* is NIL
walk won’t yield declarations, because WALK-DECLARE errors out since all forms
with *DECLARATION-CONTEXT?* T keep them local (that is, in WALK-LET, WALK-FLET
and WALK-MULTIPLE-VALUE-BIND b-decls/edecls are always NIL.)
Don’t walk the CAR of a list. CDR might not be walked as well.
a.k.a. walk-locally
Walk CDR, ignoring declarations, that might be present in it.
Set *TOP-LEVEL?* to NIL (via WALK-ARGLIST). Note that when *TOP-LEVEL?* is NIL
walk won’t yield declarations, because WALK-DECLARE errors out since all forms
with *DECLARATION-CONTEXT?* T keep them local (that is, in WALK-LET, WALK-FLET
and WALK-MULTIPLE-VALUE-BIND b-decls/edecls are always NIL.)
Walk DECLARATION. Declarations should be put in the declaration section
of the loop. They are only allowed at top-level, except that they are allowed
within binding environments, in which case they apply only to that
binding environment.
Walk EXPR and return just the PROGN-WRAP’ped body.
Other returned by walking values are AUGMENT’ed to globals and
returned by PROCESS-CLAUSE in the end of processing it.
This isn’t used by the code walker itself, but is useful for clauses, that need to walk parts of themselves.
Walk FLET or LABELS declarations. We don’t worry about the function bindings.
Walk lambdas’ and functions’ specs in FLET and LABELS.
FORM is (lambda-or-name args . body).
Only walk at the body. The args are set up as internal variables.
Declarations are kept internal to the body.
Walk FUNCTION specification.
Walk LET-form, with BINDINGS and BODY, which may contain ITERATE clauses.
The declarations go inside this let, not to the top-level. It is an error
to use a variable in the LET-bindings as the target of accumulation
(i.e. INTO), because ITERATE will try to make a top-level binding for
that variable.
The same goes for other variables, that might be so bound.
Walk BINDINGS for LET* one at a time, to get the variable scoping right.
Walk a simgle BINDING for LET or LET*.
Walk BINDINGS, established by LET or LET*.
Walk FORMS, as a simple list.
Lowest-level walking function for lists. Applies WALK-FN to LST. Applies BODY-DURING to the body part, returned by WALK-FN.
MACROLET is not supported inside ITER. Signal an error.
Walk BINDINGS for MULTIPLE-VALUE-BIND. Declarations go inside the MULTIPLE-VALUE-BIND form, not to the top-level. See WALK-LET for binding subtleties.
Don’t walk the CAR of a list. CDR might not be walked as well, though.
The only difference between this and WALK-CDR is that *TOP-LEVEL* isn’t bound.
This is so macros can return PROGNs of things.
It’s exactly like the definition of ’top-level’ in lisp.
(Also, just for looks, this returns NIL if the PROGN is empty.)
Walk every thing in THINGS.
Walk a special form, defined in *SPECIAL-FORM-ALIST*.
Wrap FORM with WRAPPERS, that should be given as a list.
case-failure
)) ¶case-failure
)) ¶Generic element access in OBJ by KEY. Supports chaining with KEYS.
standard-object
) key &rest keys-and-val) ¶structure-object
) key &rest keys-and-val) ¶hash-table
) key &rest keys-and-val) ¶sequence
) key &rest keys-and-val) ¶vector
) key &rest keys-and-val) ¶list
) key &rest keys-and-val) ¶(eql nil)
) key &rest keys) ¶Similar to (SETF SLOT-VALUE) but tries to find slot definitions regardless of the package.
Clause-info structures, which are put in the clause index.
Driver-info structures, used by NEXT.
Info structure, used by PREVIOUS.
Info structure, used by the PREVIOUS.
Jump to: | #
(
-
2
<
=
?
@
^
A B C D E F G H I J K L M N O P Q R S T U V W X Z |
---|
Jump to: | #
(
-
2
<
=
?
@
^
A B C D E F G H I J K L M N O P Q R S T U V W X Z |
---|
Jump to: | *
+
C D F G I K N O P R S U V |
---|
Jump to: | *
+
C D F G I K N O P R S U V |
---|
Jump to: | A B C D F G H I K L M P R S T |
---|
Jump to: | A B C D F G H I K L M P R S T |
---|