The com.clearly-useful.iterator-protocol Reference Manual

This is the com.clearly-useful.iterator-protocol Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 04:50:33 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 com.clearly-useful.iterator-protocol

A simple iterator protocol for Common Lisp.

Author

Jason Aeschliman <>

License

revised BSD

Version

0.1

Dependencies
  • com.clearly-useful.protocols (system).
  • com.clearly-useful.generic-collection-interface (system).
Source

com.clearly-useful.iterator-protocol.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 com.clearly-useful.iterator-protocol/com.clearly-useful.iterator-protocol.asd

Source

com.clearly-useful.iterator-protocol.asd.

Parent Component

com.clearly-useful.iterator-protocol (system).

ASDF Systems

com.clearly-useful.iterator-protocol.


3.1.3 com.clearly-useful.iterator-protocol/com.clearly-useful.iterator-protocol.lisp

Dependency

package.lisp (file).

Source

com.clearly-useful.iterator-protocol.asd.

Parent Component

com.clearly-useful.iterator-protocol (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 com.clearly-useful.iterator-protocol

Source

package.lisp.

Use List
  • com.clearly-useful.generic-collection-interface.
  • com.clearly-useful.protocols.
  • common-lisp.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: do-iterator ((var form &optional return-form) &body body)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.


5.1.2 Ordinary functions

Function: iterator-p (object)

test if object implements ITERATOR

Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.


5.1.3 Generic functions

Generic Function: iterator (object)

convert an object to ITERATOR protocol, or error.

Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Methods
Method: iterator ((a hash-table))
Method: iterator ((an array))
Method: iterator ((a vector))
Method: iterator (object)
Method: iterator ((object %indexable-iterator))
Method: iterator ((object %vector-iterator))
Method: iterator ((object %seq-iterator))
Generic Function: iterator-finish! (it)

performs ’clean up’ operations specific to the iterator. e.g. closing a file.

Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Methods
Method: iterator-finish! ((it %indexable-iterator))
Method: iterator-finish! ((it %vector-iterator))
Method: iterator-finish! ((it %seq-iterator))
Method: iterator-finish! (it)
Generic Function: iterator-next! (it)

returns two values:
1. the next value of the iterator or nil,
2. t or nil depending depending whether a value was found. then advances the iterator.

Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Methods
Method: iterator-next! ((it %indexable-iterator))
Method: iterator-next! ((it %vector-iterator))
Method: iterator-next! ((it %seq-iterator))
Method: iterator-next! (it)

5.1.4 Types

Type: iterator ()

A simple iteration protocol for Common Lisp. Unlike sequences, iterators are stateful, and are not intended to be held onto or passed around. Their use should be hidden by some other construct. If you are explicitly creating and advancing an iterator, chances are you are Doing It Wrong.
Iterators should be be treated as though they have dynamic extent.

Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.


5.2 Internals


5.2.1 Ordinary functions

Function: %advance (o)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Function: %has-value (o)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Reader: %indexable-iterator-idx (instance)
Writer: (setf %indexable-iterator-idx) (instance)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Target Slot

idx.

Function: %indexable-iterator-p (object)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Reader: %indexable-iterator-pos (instance)
Writer: (setf %indexable-iterator-pos) (instance)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Target Slot

pos.

Reader: %indexable-iterator-size (instance)
Writer: (setf %indexable-iterator-size) (instance)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Target Slot

size.

Function: %seq-iterator-p (object)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Reader: %seq-iterator-seq (instance)
Writer: (setf %seq-iterator-seq) (instance)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Target Slot

seq.

Function: %value (o)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Function: %vector-iterator-p (object)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Reader: %vector-iterator-pos (instance)
Writer: (setf %vector-iterator-pos) (instance)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Target Slot

pos.

Reader: %vector-iterator-size (instance)
Writer: (setf %vector-iterator-size) (instance)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Target Slot

size.

Reader: %vector-iterator-vec (instance)
Writer: (setf %vector-iterator-vec) (instance)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Target Slot

vec.

Function: copy-%indexable-iterator (instance)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Function: copy-%seq-iterator (instance)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Function: copy-%vector-iterator (instance)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Function: make-%indexable-iterator (&key size idx pos)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Function: make-%seq-iterator (&key seq)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Function: make-%vector-iterator (&key size vec pos)
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.


5.2.2 Standalone methods

Method: implements-protocol? ((object %seq-iterator) (protocol (eql #<com.clearly-useful.protocols::protocol {100a04b5e3}>)))
Package

com.clearly-useful.protocols.

Source

com.clearly-useful.iterator-protocol.lisp.

Method: implements-protocol? ((object %indexable-iterator) (protocol (eql #<com.clearly-useful.protocols::protocol {100a04b5e3}>)))
Package

com.clearly-useful.protocols.

Source

com.clearly-useful.iterator-protocol.lisp.

Method: implements-protocol? ((object %vector-iterator) (protocol (eql #<com.clearly-useful.protocols::protocol {100a04b5e3}>)))
Package

com.clearly-useful.protocols.

Source

com.clearly-useful.iterator-protocol.lisp.


5.2.3 Structures

Structure: %indexable-iterator
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Direct superclasses

structure-object.

Direct methods
Direct slots
Slot: size
Readers

%indexable-iterator-size.

Writers

(setf %indexable-iterator-size).

Slot: idx
Readers

%indexable-iterator-idx.

Writers

(setf %indexable-iterator-idx).

Slot: pos
Readers

%indexable-iterator-pos.

Writers

(setf %indexable-iterator-pos).

Structure: %seq-iterator
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Direct superclasses

structure-object.

Direct methods
Direct slots
Slot: seq
Package

com.clearly-useful.generic-collection-interface.

Readers

%seq-iterator-seq.

Writers

(setf %seq-iterator-seq).

Structure: %vector-iterator
Package

com.clearly-useful.iterator-protocol.

Source

com.clearly-useful.iterator-protocol.lisp.

Direct superclasses

structure-object.

Direct methods
Direct slots
Slot: size
Readers

%vector-iterator-size.

Writers

(setf %vector-iterator-size).

Slot: vec
Readers

%vector-iterator-vec.

Writers

(setf %vector-iterator-vec).

Slot: pos
Readers

%vector-iterator-pos.

Writers

(setf %vector-iterator-pos).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
C   D   F   G   I   M  
Index Entry  Section

%
%advance: Private ordinary functions
%has-value: Private ordinary functions
%indexable-iterator-idx: Private ordinary functions
%indexable-iterator-p: Private ordinary functions
%indexable-iterator-pos: Private ordinary functions
%indexable-iterator-size: Private ordinary functions
%seq-iterator-p: Private ordinary functions
%seq-iterator-seq: Private ordinary functions
%value: Private ordinary functions
%vector-iterator-p: Private ordinary functions
%vector-iterator-pos: Private ordinary functions
%vector-iterator-size: Private ordinary functions
%vector-iterator-vec: Private ordinary functions

(
(setf %indexable-iterator-idx): Private ordinary functions
(setf %indexable-iterator-pos): Private ordinary functions
(setf %indexable-iterator-size): Private ordinary functions
(setf %seq-iterator-seq): Private ordinary functions
(setf %vector-iterator-pos): Private ordinary functions
(setf %vector-iterator-size): Private ordinary functions
(setf %vector-iterator-vec): Private ordinary functions

C
copy-%indexable-iterator: Private ordinary functions
copy-%seq-iterator: Private ordinary functions
copy-%vector-iterator: Private ordinary functions

D
do-iterator: Public macros

F
Function, %advance: Private ordinary functions
Function, %has-value: Private ordinary functions
Function, %indexable-iterator-idx: Private ordinary functions
Function, %indexable-iterator-p: Private ordinary functions
Function, %indexable-iterator-pos: Private ordinary functions
Function, %indexable-iterator-size: Private ordinary functions
Function, %seq-iterator-p: Private ordinary functions
Function, %seq-iterator-seq: Private ordinary functions
Function, %value: Private ordinary functions
Function, %vector-iterator-p: Private ordinary functions
Function, %vector-iterator-pos: Private ordinary functions
Function, %vector-iterator-size: Private ordinary functions
Function, %vector-iterator-vec: Private ordinary functions
Function, (setf %indexable-iterator-idx): Private ordinary functions
Function, (setf %indexable-iterator-pos): Private ordinary functions
Function, (setf %indexable-iterator-size): Private ordinary functions
Function, (setf %seq-iterator-seq): Private ordinary functions
Function, (setf %vector-iterator-pos): Private ordinary functions
Function, (setf %vector-iterator-size): Private ordinary functions
Function, (setf %vector-iterator-vec): Private ordinary functions
Function, copy-%indexable-iterator: Private ordinary functions
Function, copy-%seq-iterator: Private ordinary functions
Function, copy-%vector-iterator: Private ordinary functions
Function, iterator-p: Public ordinary functions
Function, make-%indexable-iterator: Private ordinary functions
Function, make-%seq-iterator: Private ordinary functions
Function, make-%vector-iterator: Private ordinary functions

G
Generic Function, iterator: Public generic functions
Generic Function, iterator-finish!: Public generic functions
Generic Function, iterator-next!: Public generic functions

I
implements-protocol?: Private standalone methods
implements-protocol?: Private standalone methods
implements-protocol?: Private standalone methods
iterator: Public generic functions
iterator: Public generic functions
iterator: Public generic functions
iterator: Public generic functions
iterator: Public generic functions
iterator: Public generic functions
iterator: Public generic functions
iterator: Public generic functions
iterator-finish!: Public generic functions
iterator-finish!: Public generic functions
iterator-finish!: Public generic functions
iterator-finish!: Public generic functions
iterator-finish!: Public generic functions
iterator-next!: Public generic functions
iterator-next!: Public generic functions
iterator-next!: Public generic functions
iterator-next!: Public generic functions
iterator-next!: Public generic functions
iterator-p: Public ordinary functions

M
Macro, do-iterator: Public macros
make-%indexable-iterator: Private ordinary functions
make-%seq-iterator: Private ordinary functions
make-%vector-iterator: Private ordinary functions
Method, implements-protocol?: Private standalone methods
Method, implements-protocol?: Private standalone methods
Method, implements-protocol?: Private standalone methods
Method, iterator: Public generic functions
Method, iterator: Public generic functions
Method, iterator: Public generic functions
Method, iterator: Public generic functions
Method, iterator: Public generic functions
Method, iterator: Public generic functions
Method, iterator: Public generic functions
Method, iterator-finish!: Public generic functions
Method, iterator-finish!: Public generic functions
Method, iterator-finish!: Public generic functions
Method, iterator-finish!: Public generic functions
Method, iterator-next!: Public generic functions
Method, iterator-next!: Public generic functions
Method, iterator-next!: Public generic functions
Method, iterator-next!: Public generic functions


A.4 Data types

Jump to:   %  
C   F   I   P   S   T  
Index Entry  Section

%
%indexable-iterator: Private structures
%seq-iterator: Private structures
%vector-iterator: Private structures

C
com.clearly-useful.iterator-protocol: The com․clearly-useful․iterator-protocol system
com.clearly-useful.iterator-protocol: The com․clearly-useful․iterator-protocol package
com.clearly-useful.iterator-protocol.asd: The com․clearly-useful․iterator-protocol/com․clearly-useful․iterator-protocol․asd file
com.clearly-useful.iterator-protocol.lisp: The com․clearly-useful․iterator-protocol/com․clearly-useful․iterator-protocol․lisp file

F
File, com.clearly-useful.iterator-protocol.asd: The com․clearly-useful․iterator-protocol/com․clearly-useful․iterator-protocol․asd file
File, com.clearly-useful.iterator-protocol.lisp: The com․clearly-useful․iterator-protocol/com․clearly-useful․iterator-protocol․lisp file
File, package.lisp: The com․clearly-useful․iterator-protocol/package․lisp file

I
iterator: Public types

P
Package, com.clearly-useful.iterator-protocol: The com․clearly-useful․iterator-protocol package
package.lisp: The com․clearly-useful․iterator-protocol/package․lisp file

S
Structure, %indexable-iterator: Private structures
Structure, %seq-iterator: Private structures
Structure, %vector-iterator: Private structures
System, com.clearly-useful.iterator-protocol: The com․clearly-useful․iterator-protocol system

T
Type, iterator: Public types