This is the colliflower Reference Manual, version 0.2.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:47:19 2024 GMT+0.
colliflower
liter
liter/interface
liter/base
liter/generate
liter/tools
liter/iter-object
liter/file
garten
garten/interface
garten/base
garten/grower
garten/list
garten/tools
colliflower/interface
silo
silo/interface
silo/protocol
silo/base
colliflower/ext
colliflower/colliflower.asd
liter/liter.asd
garten/garten.asd
silo/silo.asd
liter/interface/file-type.lisp
liter/base/file-type.lisp
liter/generate/file-type.lisp
liter/tools/file-type.lisp
liter/iter-object/file-type.lisp
liter/file/file-type.lisp
garten/interface/file-type.lisp
garten/base/file-type.lisp
garten/grower/file-type.lisp
garten/list/file-type.lisp
garten/tools/file-type.lisp
colliflower/interface/file-type.lisp
silo/interface/file-type.lisp
silo/protocol/file-type.lisp
silo/base/file-type.lisp
colliflower/ext/file-type.lisp
The main system appears first, followed by any subsystem dependency.
colliflower
liter
liter/interface
liter/base
liter/generate
liter/tools
liter/iter-object
liter/file
garten
garten/interface
garten/base
garten/grower
garten/list
garten/tools
colliflower/interface
silo
silo/interface
silo/protocol
silo/base
colliflower/ext
colliflower
Generic interfaces for collections and iterators.
Thayne McCombs <bytecurry.software@gmail.com>
MIT
0.2.1
asdf-package-system
(system).
liter
(system).
garten
(system).
colliflower/interface
(system).
liter
Collection of tools for basic iterators
Thayne McCombs <bytecurry.software@gmail.com>
MIT
0.2.0
liter/interface
(system).
liter/interface
Thayne McCombs <bytecurry.software@gmail.com>
MIT
liter/base
(system).
liter/generate
(system).
liter/tools
(system).
liter/iter-object
(system).
liter/file
(system).
liter/base
Thayne McCombs <bytecurry.software@gmail.com>
MIT
iterate
(system).
serapeum
(system).
liter/generate
Thayne McCombs <bytecurry.software@gmail.com>
MIT
liter/base
(system).
serapeum
(system).
liter/tools
Thayne McCombs <bytecurry.software@gmail.com>
MIT
liter/base
(system).
liter/generate
(system).
iterate
(system).
liter/iter-object
Thayne McCombs <bytecurry.software@gmail.com>
MIT
closer-mop
(system).
liter/file
Thayne McCombs <bytecurry.software@gmail.com>
MIT
liter/base
(system).
liter/iter-object
(system).
garten
Generic interface for "growing" data structures/collections.
0.1.0
garten/interface
(system).
garten/base
liter/base
(system).
serapeum
(system).
garten/grower
(system).
garten/list
(system).
garten/list
garten/grower
(system).
iterate
(system).
serapeum
(system).
garten/tools
garten/grower
(system).
iterate
(system).
alexandria
(system).
colliflower/interface
Thayne McCombs <bytecurry.software@gmail.com>
MIT
liter
(system).
silo
(system).
garten
(system).
colliflower/ext
(system).
silo
Generic getters and setters for data structures.
MIT
0.2.0
silo/interface
(system).
silo/interface
MIT
silo/protocol
(system).
silo/base
(system).
colliflower/ext
Thayne McCombs <bytecurry.software@gmail.com>
MIT
Files are sorted by type and then listed depth-first from the systems components trees.
colliflower/colliflower.asd
liter/liter.asd
garten/garten.asd
silo/silo.asd
liter/interface/file-type.lisp
liter/base/file-type.lisp
liter/generate/file-type.lisp
liter/tools/file-type.lisp
liter/iter-object/file-type.lisp
liter/file/file-type.lisp
garten/interface/file-type.lisp
garten/base/file-type.lisp
garten/grower/file-type.lisp
garten/list/file-type.lisp
garten/tools/file-type.lisp
colliflower/interface/file-type.lisp
silo/interface/file-type.lisp
silo/protocol/file-type.lisp
silo/base/file-type.lisp
colliflower/ext/file-type.lisp
liter/base/file-type.lisp
liter/base
(system).
do-iterable
(macro).
do-iterator
(macro).
end-iteration
(function).
get-iterator
(generic function).
inext
(function).
iteration-ended
(condition).
iterator-list
(function).
make-byte-stream-iterator
(function).
make-character-stream-iterator
(function).
make-hash-key-iterator
(function).
make-hash-value-iterator
(function).
make-line-iterator
(function).
clause-for-in-iterable-2
(macro).
clause-for-in-iterator-1
(macro).
unhandled-iteration-end
(condition).
liter/generate/file-type.lisp
liter/generate
(system).
icounter
(function).
icycle
(function).
icycle*
(function).
irepeat
(compiler macro).
irepeat
(function).
make-iterator
(macro).
make-state-iterator
(function).
make-state-iterator*
(macro).
singleton-iterator
(function).
ilist
(function).
liter/tools/file-type.lisp
liter/tools
(system).
iaccumulate
(function).
ichain
(function).
idrop
(function).
idrop-while
(function).
ifilter
(function).
ifold
(function).
itake
(function).
itake-while
(function).
itee
(function).
itransform
(function).
izip
(function).
izip-longest
(function).
izip-with-index
(function).
liter/iter-object/file-type.lisp
liter/iter-object
(system).
initialize-instance
(method).
iter-object
(class).
iter-object-end-p
(generic function).
iter-object-next
(generic function).
iter-object-prev
(generic function).
liter/file/file-type.lisp
liter/file
(system).
file-iterator
(class).
file-iterator-stream
(reader method).
(setf file-iterator-stream)
(writer method).
iter-object-end-p
(method).
iter-object-next
(method).
make-file-iterator
(function).
with-file-iterator
(macro).
%get-read-function
(function).
file-iterator-reader
(reader method).
(setf file-iterator-reader)
(writer method).
garten/base/file-type.lisp
garten/base
(system).
feed
(method).
feed
(method).
feed
(method).
feed
(method).
feed
(method).
feed
(method).
feed-iterable
(method).
fruit
(method).
fruit
(method).
make-grower
(method).
make-grower
(method).
make-grower
(method).
reset-grower
(method).
reset-grower
(method).
reset-grower
(method).
*default-grower-size*
(special variable).
garten/grower/file-type.lisp
garten/grower
(system).
feed
(generic function).
feed*
(function).
feed-iterable
(generic function).
fruit
(generic function).
grower
(class).
grower-state
(reader method).
(setf grower-state)
(writer method).
make-grower
(generic function).
reset-grower
(generic function).
garten/list/file-type.lisp
garten/list
(system).
feed
(method).
feed
(method).
feed
(method).
feed
(method).
feed
(method).
feed-iterable
(method).
fruit
(method).
list-grower
(class).
make-grower
(method).
make-grower
(method).
make-grower
(method).
plist-grower
(class).
prepend-list-grower
(class).
reset-grower
(method).
%plist-feed
(function).
plist-grower-default
(reader method).
garten/tools/file-type.lisp
garten/tools
(system).
with-grower
(macro).
clause-growing-from-3
(macro).
colliflower/interface/file-type.lisp
colliflower/interface
(system).
silo/protocol/file-type.lisp
silo/protocol
(system).
contains-p
(generic function).
define-sgetter
(macro).
rget
(macro).
rget-apply
(function).
sdel
(generic function).
sget
(generic function).
(setf sget)
(generic function).
(setf slocation)
(setf expander).
sremove
(generic function).
ssetf
(macro).
supdate
(generic function).
silo/base/file-type.lisp
silo/base
(system).
alist-key
(function).
contains-p
(method).
contains-p
(method).
contains-p
(method).
contains-p
(method).
contains-p
(method).
contains-p
(method).
plist-key
(function).
sdel
(method).
sget
(method).
sget
(method).
sget
(method).
sget
(method).
sget
(method).
sget
(method).
sget
(method).
(setf sget)
(method).
(setf sget)
(method).
(setf sget)
(method).
(setf sget)
(method).
(setf sget)
(method).
(setf sget)
(method).
(setf sget)
(method).
supdate
(method).
supdate
(method).
%alist-ref
(class).
%plist-ref
(class).
colliflower/ext/file-type.lisp
colliflower/ext
(system).
grow-from-iterable
(function).
Packages are listed by definition order.
liter/tools
silo/protocol
garten/tools
liter/interface
liter/iter-object
liter/file
liter/base
liter/generate
garten/base
colliflower/interface
garten/list
garten/grower
silo/interface
silo/base
colliflower/ext
garten/interface
liter/tools
common-lisp
.
iterate
.
liter/base
.
liter/generate
.
iaccumulate
(function).
ichain
(function).
idrop
(function).
idrop-while
(function).
ifilter
(function).
ifold
(function).
itake
(function).
itake-while
(function).
itee
(function).
itransform
(function).
izip
(function).
izip-longest
(function).
izip-with-index
(function).
silo/protocol
common-lisp
.
contains-p
(generic function).
define-sgetter
(macro).
rget
(macro).
rget-apply
(function).
sdel
(generic function).
sget
(generic function).
(setf sget)
(generic function).
(setf slocation)
(setf expander).
sremove
(generic function).
ssetf
(macro).
supdate
(generic function).
garten/tools
common-lisp
.
garten/grower
.
iterate
.
with-grower
(macro).
clause-growing-from-3
(macro).
liter/interface
Liter is a collection of tools to work with basic iterators.
An iterator in Liter is just a function (usually a closure) which returns
the next value in the iterable, and signals a ITERATION-ENDED condition
if there are no more values. It should follow the following rules:
* An iterator MAY be called with optional, keyword, or rest arguments, but MUST function
correctly if called with no arguments.
* If an iterator has completed, it SHOULD signal an ITERATION-ENDED condition, typically using
END-ITERATION.
* Once an iterator signals an ITERATION-ENDED condition, it SHOULD signal an ITERATION-ENDED
condition on each future call, unless something changes the state of the iterator so that it
can continue iterating.
* Client code SHOULD handle any ITERATION-ENDED condition, or use a function or macro that does
(such as the iterate drivers, DO-ITERATOR, etc).
* Additional return values may be ignored by the caller of an iterator.
* By convention, key-value pairs SHOULD be represented as a cons pair. (as in alists)
* An iterator MAY be infinite, but not all liter functions can be safely used with such
iterators. Functions such as ITAKE can be used to convert an infinite iterator to a finite one.
An iterable is any object for which there is a method defined for GET-ITERATOR.
Most liter function accept an iterable, and will get an iterator using GET-ITERATOR.
There is a GET-ITERATOR method defined for iterators that is equivalent to the identity
function, so iterators can be passed to these functions.
liter
iterator
liter/iter-object
liter-object
common-lisp
.
iter-object
(class).
iter-object-end-p
(generic function).
iter-object-next
(generic function).
iter-object-prev
(generic function).
liter/file
common-lisp
.
liter/base
.
liter/iter-object
.
file-iterator
(class).
file-iterator-stream
(generic reader).
(setf file-iterator-stream)
(generic writer).
make-file-iterator
(function).
with-file-iterator
(macro).
%get-read-function
(function).
file-iterator-reader
(generic reader).
(setf file-iterator-reader)
(generic writer).
liter/base
common-lisp
.
iterate
.
do-iterable
(macro).
do-iterator
(macro).
end-iteration
(function).
get-iterator
(generic function).
inext
(function).
iteration-ended
(condition).
iterator-list
(function).
make-byte-stream-iterator
(function).
make-character-stream-iterator
(function).
make-hash-key-iterator
(function).
make-hash-value-iterator
(function).
make-line-iterator
(function).
clause-for-in-iterable-2
(macro).
clause-for-in-iterator-1
(macro).
unhandled-iteration-end
(condition).
liter/generate
common-lisp
.
liter/base
.
icounter
(function).
icycle
(function).
icycle*
(function).
irepeat
(compiler macro).
irepeat
(function).
make-iterator
(macro).
make-state-iterator
(function).
make-state-iterator*
(macro).
singleton-iterator
(function).
ilist
(function).
garten/base
common-lisp
.
garten/grower
.
garten/list
.
liter/base
.
*default-grower-size*
(special variable).
colliflower/interface
Combination of the LITER, SILO, and GARTEN packages.
colliflower
cf
garten/list
common-lisp
.
garten/grower
.
iterate
.
list-grower
(class).
plist-grower
(class).
prepend-list-grower
(class).
%plist-feed
(function).
plist-grower-default
(generic reader).
garten/grower
common-lisp
.
liter/base
.
feed
(generic function).
feed*
(function).
feed-iterable
(generic function).
fruit
(generic function).
grower
(class).
grower-result
(generic function).
grower-state
(slot).
grower-state
(generic reader).
(setf grower-state)
(generic writer).
make-grower
(generic function).
reset-grower
(generic function).
silo/interface
silo
s
common-lisp
.
silo/base
.
silo/protocol
.
silo/base
common-lisp
.
silo/protocol
.
%alist-ref
(class).
%plist-ref
(class).
colliflower/ext
Extra utitilies that combine liter, garten, and/or silo
common-lisp
.
garten/interface
.
liter/interface
.
silo/interface
.
grow-from-iterable
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Define SGET and (SETF SGET) for a place to use sget with.
Loop over all items in the iterable ITERABLE, in a manner similar to dolist.
A DO macro in the style of dolist that executes body for each item in ITERATOR.
Create an iterator that executes BODY each time.
Basically a simple wrapper for LAMBDA. Iteration can be ended by calling END-ITERATION.
Macro form of MAKE-STATE-ITERATOR. Note that in this form INITIAL-STATE is required.
Recursive get. Calls sget for each key in turn from left to right.
As long as (SETF SGET) is defined for the final result, RGET is setfable.
Modify macro that sets a place equal to the result of SUPDATE.
Macro similar to WITH-OPEN-FILE, but VAR is bound to a file iterator instead of a STREAM. The result is guaranteed to be an actual iterator, even if closer-mop isn’t enabled.
Execute BODY where FEEDER is a function that takes a single argument, which is added
to the resulting data structure.
TYPE is the type of the structure to create. And ARGS are passed through to MAKE-GROWER.
WITH-GROWER returns the result (fruit) of the grower.
SETF expander that uses SUPDATE to compute the new value to store in PLACE.
PLACE must be a SETFable place, and since this uses SUPDATE, it is safe for operations that don’t mutate PLACE directly (such as prepending to a list).
Create a key to access values in alists with sget
Convenience function to return values for an iterator that has reached the end.
Var-arg form of feed. Add multiple items at once.
Create a growable of type TYPE from an iterable.
TYPE-ARGS are additional arguments to pass to MAKE-GROWER after the type.
Return an iterator that accumulates the results of appling OP to the previous
result and the current item.
IACCUMULATE is like IFOLD that keeps track of intermediary results.
Return a new iterator that iterates through each of the iterables passed to it in series.
Create an iterator that just counts up from FROM by amount BY forever.
The returned iterator takes an optional argument which resets the counter if true.
If a TO parameter is provided, then the counter will stop when the value returned would equal the TO parameter. Note that if using a BY parameter it is possible to step over the TO end-point, but a >= comparison is undesirable because it wouldn’t work for a negative step.
Create an iterator that iterates through ITERABLE, and then cycles through
the values again.
This stores the results of iterating over ITERABLE.
Create an iterator that cycles through the arguments passed to it.
Return an iterator over the elements of iterable after dropping the first n.
Return an iterator over the elements of iterable that drops the initial elements while PRED returns false for them. This is the inverse of ITAKE-WHILE.
Return a new iterator that iterates over the values of ITERABLE for which PREDICATE is true.
Fold over an iterable.
ITERABLE is the iterable to fold over.
OP is a binary operation that takes the accumulated result, and an iterated item
and returns a new accumulated result.
INITIAL is the initial accumulated state.
Return the next value of an iterator and whether or not an actual value was
retrieved as values.
Any additional arguments are passed through to the iterator function.
Create an iterator that returns the value V N times.
If N is negative (the default) iterate forever.
Note that CONSTANTLY is equivalent to IREPEAT with a negative N,
and in fact there is a compiler macro that compiles IREPEAT as CONSTANTLY
in that case.
Take the first N elements of iterable. Returns an iterator.
Return an iterator that returns elements from ITERABLE as long as PRED returns true when passed the value. Not that this will consume the first item where PRED returns nil and not return it.
Split a single iterable into N iterators.
The iterators are returned as values.
Note that ITEE depends on the iterator of iterable signaling an END-ITERATION
if the iterator has ended, even if an END-ITERATION has already been signaled.
Create a list from an iterator. Note that this will only work if the iterator terminates.
Return an iterator that iterates over transformed values of an iterable.
ITERABLE is on object for which GET-ITERATOR is defined.
MAP-FUN is a function which is called with each value returned by the iterator
and returns the value that the new iterator should return.
Zip iterables together.
This returns an iterator that returns a list of the results of getting the next value from each iterable. The iterator ends when the shortest of the iterables ends.
Like IZIP but stops on the longest iterable.
When a shorter iterable ends, it will continually return MISSING-VALUE until
the whole iterator ends.
Zip an iterable with an index.
Each element of the new iterator is a list of the index (starting with 0) and the next element of ITERABLE.
Get an iterator for a binary input stream.
Get an iterator for a character input stream
Create a FILE-ITERATOR using the same arguments as OPEN. In fact this is basically like OPEN, but
returns a FILE-ITERATOR instead of a stream.
If a reader function is supplied, then that function is used to read elements from the file. So for example,
#’read-line can be used for the iterator to return lines at a time. The reader function takes an input stream
as an argument.
By default READ-CHAR is used for a character stream and READ-BYTE is used for binary streams.
Get an iterator over the keys of H.
Get an iterator over the values of H.
Get an iterator that iterates over lines in a character stream.
Create an iterator that starts with an initial state INITIAL and on each call to the iterator STATE-MACHINE is called with the previous state as the first argument followed by any arguments passed to the iterator function. The return value is then stored and used for the next iteration.
Note that STATE-MACHINE will be called on the first iteration with INITIAL as the state.
This can be used to create simple state machines.
Create a key to access an item in a plist
A combination of RGET and APPLY. It repeatedly calls SGET on successive results for each key, and the last argument is a list of keys to use.
Create an iterator that returns element on the first iteration, and
ends on the second.
Equivalent to ‘(irepeat element 1)‘.
Test if a container contains an element or key.
The exact semantics of whether or not a container contains an
element depend on the container.
list
) (key %alist-ref
)) ¶list
) (key %plist-ref
)) ¶list
) element) ¶vector
) element) ¶hash-table
) key) ¶standard-object
) key) ¶Add an item to the collection. If the collection needs a key-value
pair, ITEM should be a CONS cell with the key as the CAR and the value as the CDR.
hash-table
) (item cons
)) ¶stream
) (item sequence
)) ¶stream
) (item integer
)) ¶stream
) (item character
)) ¶stream
) (item string
)) ¶vector
) item) ¶list
) item) ¶This is a shorthand for (nconc grower (list item))
It is defined for consistancy, but using a LIST-GROWER is more efficient for building lists.
plist-grower
) item) ¶plist-grower
) (item cons
)) ¶prepend-list-grower
) item) ¶list-grower
) item) ¶Add all items from ITERABLE into GROWER. The default method
just iterates over iterable and calls FEED with each item.
The function is generic so that GROWERs can use more efficient methods if desired.
stream
) (seq vector
)) ¶list-grower
) (items list
)) ¶More efficient way to append a list to a list-grower.
Note that the list passed in may be destructively modified. If you want a copy of the list to be appended, you can use a liter iterator over the list instead of the list itself.
file-iterator
)) ¶file-iterator
)) ¶The stream that the file-iterator is backed by.
Return the final result of a grower.
A grower doesn’t necessarily need this to be defined if there is another way to access the result,
but in most cases it should be supplied.
It is undefined what happens if this is called more than once for the same grower. Or more specifically, the behavior depends on the grower implementation.
stream
)) ¶If we got the result of a stream, then we should close it.
string-stream
)) ¶list-grower
)) ¶Default implementation is to just return the grower itself.
Get an iterator for some iterable object. Implementations are provided for builtin iterable types.
function
)) ¶The iterator for a function is just the function
(eql nil)
)) ¶The nil iterator is always empty
list
)) ¶Iterator for the items of a list, or pairs of an alist.
vector
)) ¶Iterate over the items of a vector respecting the fill-counter if extant.
array
)) ¶Iterate over elements of array in row-major order.
hash-table
)) ¶Iterate over elements of a hash-table. Returns a cons of the key and value.
Since a clousre over a the form from a HASH-TABLE-ITERATOR is undefiend, at the time
of creation a list of keys is created and the iterator closes over that.
If you know of a better way of doing this, please let me know.
stream
)) ¶Iterate over the elements of a stream. I.e. the characters of a character stream or the bytes of a byte stream.
Alias for FRUIT.
Predicate to test if the iterator has ended.
file-iterator
)) ¶Get the next object in the iter-object iterator.
file-iterator
) &rest args) ¶Get the previous object in the iter-object iterator.
This is optional for iter-object implementations.
Make a grower object that can be used to "grow"
a collection. The returned object must define the FEED method and in most
cases should define the FRUIT method and RESET-GROWER methods.
The TYPE argument is an object for which a MAKE-GROWER method is specialized, usually a symbol.
(eql hash-table)
) &rest args &key &allow-other-keys) ¶Create a grower for a hash-table. Any additional arguments will be passed through to MAKE-HASH-TABLE.
(eql string)
) &key element-type) ¶Create a grower for a string. @cl:param(element-type) is the element type of the resulting string.
(eql vector)
) &key size element-type adjustable) ¶Create a growable vector. @cl:param(size) is the initial size of the vector to grow,
@cl:param(element-type) is the element-type of the vector. And if @cl:param(adjustable)
is false, then the vector cannot be grown beyond SIZE.
The resulting vector will have a fill pointer.
(eql :alist)
) &key) ¶Create a grower for an alist. Items should be added as cons cells.
This is basically just a shortcut for a list grower with prepend set to true.
(eql :plist)
) &key default) ¶Create a grower that create a plist. Items should be added as a cons cell
with the key and value as the car and cdr respectively.
If an item is passed to FEED that isn’t a cons, then the output will use the item as a key and the default passed as DEFAULT as the value.
(eql list)
) &key prepend) ¶Create a grower that creates a list.
By default items are added to the end of the list, and the list is built using a LIST-GROWER.
However, if PREPEND is true, then items are pushed onto the front of the list.
Reset a grower to an empty collection.
This can be used to recycle data structures if the result is no longer used.
But it is undefined whether it is safe to use the result of FRUIT after RESET-GROWER
has been called on the grower that generated it.
It also may not be defined for all growers.
hash-table
)) ¶string-stream
)) ¶vector
)) ¶list-grower
)) ¶Generic delete function. Companion to sget and sset.
Like SSET it MUST return the object with changes.
hash-table
) key &key) ¶Delete an object from a hash-table.
Generic get function. Provides a uniform way to
access properties of an object. The s stands for super, simple, or standard.
It is setfable as long as @c((setf sget)) is defined as well, which it should be for mutable objects.
list
) (key %alist-ref
) &key) ¶list
) (key %plist-ref
) &key default) ¶list
) (key integer
) &key) ¶array
) (subscripts list
) &key) ¶vector
) (index integer
) &key) ¶hash-table
) key &key default) ¶standard-object
) key &key) ¶Generic set function. companion to sget.
SSET should mutate OBJECT.
Note that for some data types (ex lists, objects) this can’t be used to set new values.
You may be able to use SUPDATE in those cases.
list
) (key %alist-ref
) &key) ¶list
) (key %plist-ref
) &key default) ¶list
) (key integer
) &key) ¶array
) (subscripts list
) &key) ¶vector
) (index integer
) &key) ¶hash-table
) key &key default) ¶standard-object
) key &key) ¶SREMOVE is to SDEL what SUPDATE is to (SETF SGET):
It returns a collection with the item for KEY removed which may or may not be
the same object as OBJECT, and which may or may not mutate OBJECT.
Generic update function. Unlike (SETF SGET) it may or may not mutate
OBJECT. Data structures should define one or both of (SETF SGET) and SUPDATE.
SUPDATE MUST return the updated object.
For immutable data structures, SUPDATE can be used to create updated data structures. It also works for prepending to lists such as plists or alists.
list
) (key %alist-ref
) value &key) ¶For an ALIST supdate will either replace an existing value, or add a new cons pair to the front of the list if the associated key isn’t already in the list.
list
) (key %plist-ref
) value &key) ¶Default implementation just calls SSET and returns OBJECT.
iter-object
) &key &allow-other-keys) ¶Condition signaled when an iterator has reached the end.
simple-condition
.
An iterator object that represents the iteration state of iterating over a file stream.
The stream that the file-iterator is backed by.
common-lisp
.
file-stream
:file-stream
The function to use to read from the stream. The results of calling this function will be the elements of the iterator.
(function (stream) t)
:reader
Base class for specialized growers.
Note that not all grower’s will be subclasses of GROWER.
The state of the grower. By default this is what is returned by FRUIT.
:init-state
A class to represent an iterator object.
It is a funcallable object that calls ITER-OBJECT-NEXT when called.
Subclasses should use a metaclass of CLOSER-MOP:FUNCALLABLE-STANDARD-CLASS.
funcallable-standard-object
.
A grower for a list that allows appending elements in constant time.
A queue of items added. This makes insertion at the end a constant time operation.
(serapeum:queue)
A grower that creates a plist. Items added should be cons cells
of the key and value. If an item isn’t a cons cell it is treated as a key, with a value
of DEFAULT-VALUE.
The default value to store in the plist if the fed item isn’t a cons cell.
:default
This slot is read-only.
A List grower that prepends values rather than appending them.
feed
.
The default initial size to use when creating a grower that needs an initial size, such as a vector.
Iterate over all items in an iterable.
Iterate over all items in an iterator.
Iterate clause similar to COLLECT but can grow any growable structure.
TYPE is the type of growable to create. If TYPE is a symbol it doesn’t need to be quoted.
If provided, GROWER-ARGS should be a plist of arguments to pass to MAKE-GROWER
after the TYPE parameter.
Note that VAR will contain the grower object, not the end result. If you store
the grower in a variable it is up to you to call FRUIT on the grower when needed.
EXPR is the actual expression to store in the grower.
Iterate over the arguments passed in. Then terminate.
file-iterator
)) ¶file-iterator
)) ¶The function to use to read from the stream. The results of calling this function will be the elements of the iterator.
plist-grower
)) ¶The default value to store in the plist if the fed item isn’t a cons cell.
Error signaled if an iterator is ended and the ITERATION-ENDED condition isn’t handled in some way.
error
.
iteration-ended
.
Jump to: | %
(
A C D E F G I M P R S W |
---|
Jump to: | %
(
A C D E F G I M P R S W |
---|
Jump to: | *
D G I K R S T |
---|
Jump to: | *
D G I K R S T |
---|
Jump to: | %
C F G I L P S U |
---|
Jump to: | %
C F G I L P S U |
---|