This is the clazy Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:36:37 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
clazy
The CLAZY System.
Marco Antoniotti
The CLAZY System.
The CLAZY system (as in ’I must be CLAZY!’) contains a set of definitions useful for introducing lazy evaluation via lazy calls in Common Lisp; i.e., CLAZY turns parts of Common Lisp into a non-strict functional language.
clazy-package.lisp
(file).
lambda-list-parsing.lisp
(file).
clazy.lisp
(file).
impl-dependent
(module).
library.lisp
(file).
seq-funs-package.lisp
(file).
seq-funs.lisp
(file).
Modules are listed depth-first from the system components tree.
clazy/impl-dependent
clazy-package.lisp
(file).
clazy
(system).
sbcl.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
clazy/clazy.asd
clazy/clazy-package.lisp
clazy/lambda-list-parsing.lisp
clazy/clazy.lisp
clazy/impl-dependent/sbcl.lisp
clazy/library.lisp
clazy/seq-funs-package.lisp
clazy/seq-funs.lisp
clazy/lambda-list-parsing.lisp
clazy-package.lisp
(file).
clazy
(system).
parse-ordinary-lambda-list
(function).
clazy/clazy.lisp
clazy-package.lisp
(file).
lambda-list-parsing.lisp
(file).
clazy
(system).
call
(macro).
def-lazy-function
(macro).
deflazy
(macro).
delay
(macro).
force
(function).
initialize-instance
(method).
invalid-lazy-argument
(condition).
lazy
(macro).
lazy-lambda
(structure).
lazy-lambda-arglist
(reader).
lazy-lambda-code
(reader).
lazy-lambda-p
(function).
let/lazy
(macro).
make-thunk
(macro).
print-object
(method).
print-object
(method).
thunk
(structure).
thunk-code
(reader).
thunk-p
(function).
undefined-lazy-function
(condition).
%make-thunk%
(function).
*break-if-non-lazy-call-p*
(special variable).
*warn-if-non-lazy-call-p*
(special variable).
create-thunk-call-expansion
(function).
create-var-thunk-call-expansion
(function).
get-lazy-version
(function).
(setf get-lazy-version)
(function).
lambda-expression-p
(function).
lazy-function-name-p
(function).
lazy-name
(function).
make-lazy-lambda
(function).
make-thunk-setup-code
(function).
rename-lambda-vars
(function).
tau-lambda
(macro).
thunk-form
(reader).
thunk-type
(reader).
undefined-lazy-function-name
(reader method).
undefined-lazy-lambda
(condition).
clazy/impl-dependent/sbcl.lisp
impl-dependent
(module).
arglist
(function).
clazy/library.lisp
clazy.lisp
(file).
clazy
(system).
cons-stream
(macro).
copy-lazy-stream
(function).
diverge
(function).
head
(function).
lazily
(macro).
lazy-cons
(structure).
lazy-cons-p
(function).
lazy-stream
(structure).
lazy-stream-p
(function).
print-object
(method).
print-object
(method).
repeatedly
(function).
slacking
(macro).
tail
(function).
%cons-lazy-cons
(function).
%cons-lazy-stream
(function).
copy-lazy-cons
(function).
lazy-cons-head
(function).
lazy-cons-tail
(function).
lazy-stream-head
(reader).
lazy-stream-tail
(reader).
clazy/seq-funs-package.lisp
clazy.lisp
(file).
library.lisp
(file).
clazy
(system).
clazy/seq-funs.lisp
seq-funs-package.lisp
(file).
clazy
(system).
distinct
(function).
drop
(function).
drop-while
(function).
list-index
(type).
separate
(function).
seq-index
(type).
span
(function).
split-at
(function).
tails
(function).
take
(function).
take-while
(function).
Packages are listed by definition order.
it.unimib.disco.lazy
The Common Lisp Extensions Lazy Evaluation Package.
lazy
cl.extensions.data-and-control-flow.lazy
cl.ext.dacf.lazy
clazy
common-lisp
.
call
(macro).
cons-stream
(macro).
copy-lazy-stream
(function).
def-lazy-function
(macro).
deflazy
(macro).
delay
(macro).
diverge
(function).
force
(function).
head
(function).
invalid-lazy-argument
(condition).
lazily
(macro).
lazy
(macro).
lazy-cons
(structure).
lazy-cons-p
(function).
lazy-lambda
(structure).
lazy-lambda-arglist
(reader).
lazy-lambda-code
(reader).
lazy-lambda-p
(function).
lazy-stream
(structure).
lazy-stream-p
(function).
let/lazy
(macro).
make-thunk
(macro).
repeatedly
(function).
slacking
(macro).
tail
(function).
thunk
(structure).
thunk-code
(reader).
thunk-p
(function).
undefined-lazy-function
(condition).
%cons-lazy-cons
(function).
%cons-lazy-stream
(function).
%make-thunk%
(function).
*break-if-non-lazy-call-p*
(special variable).
*warn-if-non-lazy-call-p*
(special variable).
arglist
(function).
copy-lazy-cons
(function).
create-thunk-call-expansion
(function).
create-var-thunk-call-expansion
(function).
get-lazy-version
(function).
(setf get-lazy-version)
(function).
lambda-expression-p
(function).
lazy-cons-head
(function).
lazy-cons-tail
(function).
lazy-function-name-p
(function).
lazy-name
(function).
lazy-stream-head
(reader).
lazy-stream-tail
(reader).
make-lazy-lambda
(function).
make-thunk-setup-code
(function).
parse-ordinary-lambda-list
(function).
rename-lambda-vars
(function).
tau-lambda
(macro).
thunk-form
(reader).
thunk-type
(reader).
undefined-lazy-function-name
(generic reader).
undefined-lazy-lambda
(condition).
it.unimib.disco.ma.cl.ext.sequences.lazy
cl.extensions.sequences.lazy
cl.ext.sequences.lazy
lazy-sequences
lazy-seqs
lazy-seq-utils
common-lisp
.
it.unimib.disco.lazy
.
distinct
(function).
drop
(function).
drop-while
(function).
list-index
(type).
separate
(function).
seq-index
(type).
span
(function).
split-at
(function).
tails
(function).
take
(function).
take-while
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The LAZY:CALL macro generalizes FUNCALL in order to handle lazy functions.
The LAZY:CALL macro introduces lazy evaluation in Common Lisp. The LAZY:CALL form ensures that, if possible, a lazy version of the function F is called, in which case all the arguments are automatically ‘thunked’. If no lazy version of F can be retrieved then F is FUNCALLed in the normal, strict, way with no ‘thunking’ of the arguments.
Constructs a LAZY-STREAM, DELAYing the TAIL argument.
Defines a lazy function.
The function assumes that each argument is passed as a ‘thunk’, which gets FORCEd as needed.
Defines a function while ensuring that a lazy version exists as well.
Delays an EXPRESSION by wrapping it in a ‘thunk’ (i.e. a closure).
Ensures that lazy functions are called lazily with LAZY:CALL.
The macro code-walks BODY and whenever it finds an application that has a lazily defined operator, then it rewrites such application with LAZY:CALL.
Transforms a function into a lazy equivalent.
The LAZY macro is akin to the FUNCTION special operator.
The function specified in FUNCTION-SPEC can be a symbol, a lambda
expression or a FUNCTION special form. The macro operates at the
syntactic level. The result is a function which may evaluate its
arguments in a lazy way. This is achieved by ensuring that each
argument is automatically interpreted as a ’thunk’.
If FUNCTION-SPEC is a symbol which names a lazy function (cfr.
LAZY-FUNCTION-NAME-P) then this is the result; if FUNCTION-SPEC is a
lambda expression then it is ‘lazyfied’. The same happens if
FUNCTION-SPEC is of the form (FUNCTION (LAMBDA ...)). If
FUNCTION-SPEC is of the form (FUNCTION <symbol>), then LAZY falls back
to the first case. In every other case, LAZY may yield a ‘regular’
function.
If ERRORP is non-NIL, an error of type INVALID-LAZY-ARGUMENT is generated if there is no way to associate FUNCTION-SPEC to a function; otherwise NIL is returned.
The macro operates like LET, but is delays the evaluation of the bindings.
Expands into code that creates a thunk wrapping around EXPR.
Returns a generalized sequence of distinct elements.
If SEQ is a SEQUENCE then REMOVE-DUPLICATES is called. If it is a
LAZY-STREAM then a new LAZY-STREAM is returned, with repeated elements
removed. Key arguments are only TEST and KEY.
Arguments and Values:
SEQ : a (OR NULL SEQUENCE LAZY-STREAM)
TEST : a (FUNCTION (T T) <generalized boolean>)
KEY : a (FUNCTION (T) T)
DISTINCTS-TABLE : a HASH-TABLE
KEYS : a LIST (actually a p-list of the keywords arguments)
result : a (OR NULL SEQUENCE LAZY-STREAM)
A function that never returns.
It is equivalent to (LOOP). It should not be called striclty: called striclty: it will never terminate.
Drops the first N elements of the sequence SEQ.
The result is a fresh sequence of the last (- (length SEQ) N) elements. SEQ can be a SEQUENCE or a LAZY-STREAM. The type of the result is the same as the type of SEQ if this is a SEQUENCE, otherwise it is a LAZY-STREAM or NIL (if dropping more items than the - finite - length of the LAZY-STREAM).
Drops the first elements of the sequence SEQ that satisfy the predicate P.
Forces the evaluation of a THUNK.
If THUNK is a regular value it is returned as is.
Returns the first element of a SEQUENCE or a LAZY-STREAM.
Returns a lazy list containing repeated applications of FN to ARGS.
Returns two subsequences of SEQ split at the N-th element.
Returns the rest of a LIST or LAZY-STREAM.
Takes the first N elements of the sequence SEQ.
The result is a fresh sequence of the first N elements. SEQ can be a SEQUENCE or a LAZY-STREAM. The type of the result is the same as the type of SEQ if this is a SEQUENCE, otherwise it is a LIST.
Takes the first elements of the sequence SEQ that satisfy the predicate P.
SEQ can be a SEQUENCE or a LAZY-STREAM. The type of the result is the
same as the type of SEQ if this is a SEQUENCE, otherwise it is a
LIST.
undefined-lazy-function
) &key name &allow-other-keys) ¶lazy-stream
) s) ¶lazy-lambda
) s) ¶Special method for printing Lazy Lambda objects.
The printing uses the ’TAU-LAMBDA’ as a prefix, since in Greek ’lazy’ is ’tempelis’; hence the ’tau’ prefix.
The Invalid Lazy Argument Condition.
This condition is signalled by LAZY operator when it cannot get hold of a lazy version of the argument.
type-error
.
The Undefined Lazy Function Condition.
A simple subclass of the UNDEFINED-FUNCTION condition. This is signalled by the LAZY operator and the LAZY:CALL macro when trying to access an undefined lazy function. This may happen also when a function has a strict definition but no lazy counterpart.
undefined-function
.
This slot is read-only.
The Lazy Cons Structure.
The LAZY-CONS structure has both head and tail lazy. It includes LAZY-STREAM.
The Lazy Lambda Structure.
This structure is a wrapper around a LAMBDA representing the actual
lazy code. Its main use is as a ‘type’ used in discrimination. The
slot CODE contains the actual lazy code, while the slot ARGLIST
containes the LAMBDA argilist.
The slots are read only. No ‘copier’ is defined. The instances are
‘immutable’.
The constuctor is defined as MAKE-LAZY-LAMBDA (&optional CODE ARGLIST) with appropriate defaults. The other usual functions automatically generated by DEFSTRUCT work as expected.
structure-object
.
function
(lambda (&rest it.unimib.disco.lazy::args) (declare (ignore it.unimib.disco.lazy::args)) (error (quote it.unimib.disco.lazy::undefined-lazy-lambda)))
This slot is read-only.
list
(quote (&rest it.unimib.disco.lazy::args))
This slot is read-only.
The Lazy Stream Structure.
The traditional implementation of SICP-like streams. The LAZY-STREAM structure has a strict head and a lazy tail.
The Thunk Structure.
A wrapper for code fragments that will be evaluated after a delay. Thunks can be created either directly by the macro MAKE-THUNK or by the macro DELAY.
structure-object
.
function
(constantly nil)
This slot is read-only.
This slot is read-only.
common-lisp
.
t
This slot is read-only.
The type of the indices inside a list.
Although not necessarily right for lists, the upper bound is set to MOST-POSITIVE-FIXNUM.
The type of the indices inside a sequence.
Although not necessarily right for lists, the upper bound is set to ARRAY-DIMENSION-LIMIT.
If non-NIL the LAZY:CALL macro breaks when it resolves in a strict call.
If non-NIL the LAZY:CALL macro generates a warning when it resolves in a strict call.
Creates a LAZY-LAMBDA.
This macro is the syntactic equivalent of the LAMBDA macro for LAZY-LAMBDAs. The name comes from the Greek ’tempelis’, which means ’lazy’; hence the ’tau’ prefix.
Retrieves the lazy version of a function named F.
If the lazy version does not exist and ERRORP is non-NIL an error of type UNDEFINED-LAZY-FUNCTION is signalled.
Checks if the symbol S names a lazy function.
Creates a symbol suitable for naming a lazy function.
Creates the actual code that sets up a thunk.
The thunk is actually a closure wrapping around two variables maintaining the thunk memoization state.
Parses a lambda list and returns each group of arguments as a separate value.
Traverses a (ordinary) lambda-list, making each argument ready for lazy evaluation.
The function returns a (ordinary) lambda list with each argument
appropriately renamed and ready to be thunked. It also returns a list
of argument names and an a-list of argument name versus renamed
argument.
Default parameters are treated correctly and thunked in the process;
keyword arguments are treated similarly, both in regular and in ‘extra
keyword’ form. &rest arguments are left untouched.
undefined-lazy-function
)) ¶Jump to: | %
(
A C D F G H I L M P R S T U Z |
---|
Jump to: | %
(
A C D F G H I L M P R S T U Z |
---|
Jump to: | *
A C F H L S T |
---|
Jump to: | *
A C F H L S T |
---|
Jump to: | C F I L M P S T U |
---|
Jump to: | C F I L M P S T U |
---|