The enumerations Reference Manual

This is the enumerations Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 15:10:12 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 enumerations

The CL-ENUMERATIONS project contains a Common Lisp
Java-like enumeration/iteration library and protocol. Most basic Common Lisp types are handled.

The project page can be found at http://common-lisp.net/project/cl-enumeration.

Author

Marco Antoniotti

License

BSD like

Source

enumerations.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 enumerations/enumerations.asd

Source

enumerations.asd.

Parent Component

enumerations (system).

ASDF Systems

enumerations.


3.1.2 enumerations/enumerations-pkg.lisp

Source

enumerations.asd.

Parent Component

enumerations (system).

Packages

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.


3.1.3 enumerations/enumerations.lisp

Dependency

enumerations-pkg.lisp (file).

Source

enumerations.asd.

Parent Component

enumerations (system).

Public Interface
Internals

3.1.4 enumerations/sequence-enumeration.lisp

Dependency

enumerations-pkg.lisp (file).

Source

enumerations.asd.

Parent Component

enumerations (system).

Internals

3.1.5 enumerations/list-enumerations.lisp

Dependency

sequence-enumeration.lisp (file).

Source

enumerations.asd.

Parent Component

enumerations (system).

Public Interface
Internals

3.1.6 enumerations/vector-enumerations.lisp

Dependency

sequence-enumeration.lisp (file).

Source

enumerations.asd.

Parent Component

enumerations (system).

Public Interface

3.1.7 enumerations/string-enumerations.lisp

Dependency

vector-enumerations.lisp (file).

Source

enumerations.asd.

Parent Component

enumerations (system).

Public Interface

3.1.8 enumerations/hash-table-enumerations.lisp

Dependency

enumerations.lisp (file).

Source

enumerations.asd.

Parent Component

enumerations (system).

Public Interface
Internals

3.1.9 enumerations/array-enumerations.lisp

Dependency

enumerations.lisp (file).

Source

enumerations.asd.

Parent Component

enumerations (system).

Public Interface

3.1.10 enumerations/number-enumerations.lisp

Dependency

enumerations.lisp (file).

Source

enumerations.asd.

Parent Component

enumerations (system).

Public Interface
Internals

3.1.11 enumerations/foreach.lisp

Dependency

enumerations.lisp (file).

Source

enumerations.asd.

Parent Component

enumerations (system).

Public Interface

foreach (macro).


4 Packages

Packages are listed by definition order.


4.1 it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations

The CL Extensions Enumeration Package.

The package containing the API for a generic enumeration protocol in Common Lisp.

Notes:

The package name is long because it indicates how to position the library functionality within the breakdown in chapters of the ANSI specification.

The lower-case "enum" package nickname is provided in order to appease ACL Modern mode.

The "CL.EXT..." nicknames are provided as a suggestion about how to ’standardize’ package names according to a meaninguful scheme.

Source

enumerations-pkg.lisp.

Nicknames
  • enum
  • enum
  • cl.extensions.enumerations
  • cl.ext.enumerations
  • cl.extensions.dacf.enumerations
  • cl.ext.dacf.enumerations
  • common-lisp.extensions.data-and-control-flow.enumerations
Use List

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: foreach ((var object &rest keys) &body forms-and-clauses)

Simplified iteration construct over an ‘enumerable’ object.

FOREACH is a thin macro over LOOP and it mixes, in a hybrid, and maybe not so beautiful, style the DOTIMES/DOLIST shape with LOOP clauses.

FORMS-AND-CLAUSES are executed in an environment where VAR is bound to the elements of the result of (APPLY #’ENUM:ENUMERATE OBJECT KEYS).

If KEYS contains a non-NIL :REVERSE keyword, then the enumeration must be bi-directional and PREVIOUS and HAS-PREVIOUS-P will be used to traverse it. :REVERSE and its value will be still passed to the embedded call to ENUMERATE. This is obviously only useful only for enumerations that can start "in the middle".

FORMS-AND-CLAUSES can start with some declarations and then continue with either regular forms or LOOP clauses. After the first LOOP clause appears in FORMS-AND-CLAUSES, standard LOOP rules should be followed.

FOREACH returns whatever is returned by FORMS-AND-CLAUSES according to standard LOOP semantics.

Examples:

;;; Here are some examples of FOREACH.

cl-prompt> (setf le (enumerate ’(1 2 3)))
#<CONS enumeration ...>

cl-prompt> (foreach (i le) (print i))
1
2
3
NIL

;;; Of course, FOREACH is smarter than that:

cl-prompt> (foreach (i (vector ’a ’s ’d))
(declare (type symbol i))
(print i))
A
S
D
NIL

;;; Apart from declarations, FOREACH is just a macro built on top of ;;; LOOP, therefore you can leverage all the LOOP functionality.

cl-prompt> (foreach (i ’(1 2 3 4))
(declare (type fixnum i))
when (evenp i)
collect i)
(2 4)

;;; While this creates an admittedly strange hybrid between the
;;; standard DO... operators and LOOP, it does serve the purpose. The ;;; right thing would be to have a standardized way of extending LOOP. ;;; Alas, there is no such luxury.

;;; Finally an example of a reverse enumeration:

cl-prompt> (foreach (i (vector 1 2 3 4 5 6 7 8) :reverse t :start 4) when (evenp i)
collect i)
(4 2)

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

foreach.lisp.


5.1.2 Ordinary functions

Function: range (start end &optional incr)

The function RANGE is a utility function the produce a "stream" (quote mandatory) of numbers. It is almost equivalent to the APL/J iota operator and to Python xrange type.

The main use of RANGE is in conjunction with FOREACH and other iteration constructs.

Arguments and Values:

START : a NUMBER
END : a NUMBER or NIL
INCR : a NUMBER or a function of one argument (default is #’1+) result : a NUMBER-ENUMERATION

Examples:

;;;; The two calls below are equivalent:

cl-prompt> (range 2 10 3)
#<Number enumeration [2 10) at 2 by #<FUNCTION> XXXXXX>

cl-prompt> (enumerate ’number :start 2 :end 10 :by 3)
#<Number enumeration [2 10) at 2 by #<FUNCTION> XXXXXX>

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

number-enumerations.lisp.


5.1.3 Generic functions

Generic Function: array-table-enumeration-p (x)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

array-enumerations.lisp.

Methods
Method: array-table-enumeration-p (x)
Method: array-table-enumeration-p ((x array-table-enumeration))
Generic Function: bi-directional-enumeration-p (x)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Methods
Method: bi-directional-enumeration-p (e)
Method: bi-directional-enumeration-p ((e bi-directional-enumeration))
Generic Function: bounded-enumeration-p (x)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Methods
Method: bounded-enumeration-p (x)
Method: bounded-enumeration-p ((x bounded-enumeration))
Generic Function: current (enum &optional errorp default)

Returns the "current" element in the enumeration ENUM.

Each ENUMERATION instance maintains a reference to its "current" element (if within "range"). Given an ENUMERATION instance enumeration, the generic function CURRENT returns the object in such reference.

If ERRORP is non-NIL and no "current" element is available, then CURRENT signals an error: either NO-SUCH-ELEMENT or a continuable error. If ERRORP is NIL and no "current" element is available then DEFAULT is returned.

Arguments and Values:

ENUM : an ENUMERATION instance
ERRORP : a generalized BOOLEAN
DEFAULT : a T
result : a T.

Exceptional Situations:

CURRENT may signal a continuable error or NO-SUCH-ELEMENT. See above for an explanation.

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Methods
Method: current ((x number-enumeration) &optional errorp default)
Source

number-enumerations.lisp.

Method: current ((x array-table-enumeration) &optional errorp default)
Source

array-enumerations.lisp.

Method: current ((x hash-table-enumeration) &optional errorp default)
Source

hash-table-enumerations.lisp.

Method: current ((x vector-enumeration) &optional errorp default)
Source

vector-enumerations.lisp.

Method: current ((x list-enumeration) &optional errorp default)
Source

list-enumerations.lisp.

Method: current ((x enumeration) &optional errorp default)
Generic Function: enumerate (enumerable-item &key start end by keys values key-value-pairs &allow-other-keys)

Creates a (specialized) ENUMERATION object.
If applicable START and END delimit the range of the actual enumeration. The generic function ENUMERATE is the main entry point in the ENUMERATIONS machinery. It takes a CL object (ENUMERABLE-ITEM) and some additional parameters, which may or may not be used depending on the type of the object to be enumerated.

Arguments and Values:

ENUMERABLE-ITEM : an Common Lisp object
START : an object (usually a non-negative integer)
END : an object or NIL
result : an ENUMERATION instance

Exceptional Situations:

ENUMERATE calls MAKE-INSTANCE on the appropriate ENUMERATION sub-class. The instance initialization machinery may signal various errors. See the documentation for each ENUMERATION sub-class for details.

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Methods
Method: enumerate ((x (eql number)) &key start end by &allow-other-keys)

Calling ENUMERATE on a the symbol NUMBER returns a NUMBER-ENUMERATION instance.

NUMBER-ENUMERATIONs are not real enumerations per se, but they have a
nice interface and serve to render things like Python xrange type.

START must be a number, while END can be a number or NIL. The next (or previous) element is obtained by changing the current element by BY.
BY can be a function (#’1+ is the default) or a number, in which case
it is always summed to the current element.

A NUMBER-ENUMERATION can also enumerate COMPLEX numbers, but in this
case the actual enumeration properties are completely determined by
the value of BY.

Source

number-enumerations.lisp.

Method: enumerate ((a array) &key start end &allow-other-keys)

Calling ENUMERATE on an ARRAY returns an ARRAY-ENUMERATION instance.

START must be either an integer between 0 and (array-total-size a), or a LIST of indices between 0 and the appropriate limit on the array-dimension. end must be an integer between 0 and (array-total-size A), or a LIST of indices between 0 and the appropriate limit on the array-dimension, or NIL. If END is NIL then it is set to (array-total-size A).

The enumeration of a multidimensional array follows the row-major order of Common Lisp Arrays.

Examples:

;;; The following example uses ENUM:FOREACH.

cl-prompt> (foreach (e #3A(((1 2 3) (4 5 6)) ((7 8 9) (10 11 12))) :start (list 1 0 1))
(print e))
8
9
10
11
12
NIL

Source

array-enumerations.lisp.

Method: enumerate ((x hash-table) &key start end keys values key-value-pairs &allow-other-keys)

Calling ENUMERATE on a HASH-TABLE returns a HASH-TABLE-ENUMERATION instance.

If KEYS is true, the HASH-TABLE-ENUMERATION scans the keys of the underlying HASH-TABLE. If VALUES is true (the default), the HASH-TABLE-ENUMERATION scans the values of the underlying HASH-TABLE.
If KEY-VALUE-PAIRS is true, then the HASH-TABLE-ENUMERATION yields key-values dotted pairs.

Note that it makes no sense to set "bounds" on a
HASH-TABLE-ENUMERATION, as an HASH-TABLE is an unordered data
structure. START and END are ignored.

Source

hash-table-enumerations.lisp.

Method: enumerate ((s string) &key start end &allow-other-keys)

Calling ENUMERATE on a STRING returns a STRING-ENUMERATION instance.

A STRING-ENUMERATION traverses the STRING s using the accessor CHAR.

START must be an integer between 0 and (length S). end must be an integer between 0 and (length S) or NIL. The usual CL semantics regarding sequence traversals applies.

Source

string-enumerations.lisp.

Method: enumerate ((v vector) &key start end &allow-other-keys)

Calling ENUMERATE on a VECTOR returns a VECTOR-ENUMERATION instance.

START must be an integer between 0 and (length V). end must be an integer between 0 and (length V) or NIL. The usual CL semantics regarding sequence traversals applies.

Source

vector-enumerations.lisp.

Method: enumerate ((l list) &key start end &allow-other-keys)

Calling ENUMERATE on a LIST returns a LIST-ENUMERATION instance.
L should be a proper list. The behavior of ENUMERATE when passed a non proper list is undefined.

START must be an integer between 0 and (length l). END must be an integer between 0 and (length L) or NIL. The usual CL semantics regarding sequence traversals applies.

Source

list-enumerations.lisp.

Method: enumerate ((x enumeration) &key start end &allow-other-keys)
Generic Function: enumerationp (x)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Methods
Method: enumerationp (x)
Method: enumerationp ((x enumeration))
Generic Function: functional-enumeration-p (x)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Methods
Method: functional-enumeration-p (x)
Method: functional-enumeration-p ((x functional-enumeration))
Generic Function: has-more-elements-p (x)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Methods
Method: has-more-elements-p ((x number-enumeration))
Source

number-enumerations.lisp.

Method: has-more-elements-p ((x array-table-enumeration))
Source

array-enumerations.lisp.

Method: has-more-elements-p ((x hash-table-enumeration))
Source

hash-table-enumerations.lisp.

Method: has-more-elements-p ((x vector-enumeration))
Source

vector-enumerations.lisp.

Method: has-more-elements-p ((x list-enumeration))
Source

list-enumerations.lisp.

Method: has-more-elements-p ((x enumeration))
Generic Function: has-next-p (x)

The generic function HAS-NEXT-P checks whether the enumeration enumeration has another element that follows the current one in the traversal order. If so it returns a non-NIL result, otherwise, result is NIL.

Arguments and Values:

X : an ENUMERATION instance
result : a T.

Examples:

cl-prompt> (defvar ve (enumerate (vector 1 2 3)))
VE

cl-prompt> (has-next-p ve)
T

cl-prompt> (loop repeat 3 do (print (next ve)))
1
2
3
NIL

cl-prompt> (has-next-p ve)
NIL

Exceptional Situations:

HAS-NEXT-P signals an error (i.e., NO-APPLICABLE-METHOD is run) if X is not an ENUMERATION instance.

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Methods
Method: has-next-p ((x number-enumeration))
Source

number-enumerations.lisp.

Method: has-next-p ((x array-table-enumeration))
Source

array-enumerations.lisp.

Method: has-next-p ((x hash-table-enumeration))
Source

hash-table-enumerations.lisp.

Method: has-next-p ((x vector-enumeration))
Source

vector-enumerations.lisp.

Method: has-next-p ((x list-enumeration))
Source

list-enumerations.lisp.

Method: has-next-p ((e enumeration))
Generic Function: has-previous-p (x)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Methods
Method: has-previous-p ((x number-enumeration))
Source

number-enumerations.lisp.

Method: has-previous-p ((x array-table-enumeration))
Source

array-enumerations.lisp.

Method: has-previous-p ((x vector-enumeration))
Source

vector-enumerations.lisp.

Method: has-previous-p ((x enumeration))
Generic Function: hash-table-enumeration-p (x)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

hash-table-enumerations.lisp.

Methods
Method: hash-table-enumeration-p (x)
Method: hash-table-enumeration-p ((x hash-table-enumeration))
Generic Function: list-enumeration-p (x)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

list-enumerations.lisp.

Methods
Method: list-enumeration-p (x)
Method: list-enumeration-p ((x list-enumeration))
Generic Function: next (e &optional default)

The generic function NEXT returns the "next" object in the enumeration enumeration if there is one, as determined by calling HAS-NEXT-P. If HAS-NEXT-P returns NIL and DEFAULT is supplied, then DEFAULT is returned. Otherwise the condition NO-SUCH-ELEMENT is signaled.

Arguments and Values:

E : an ENUMERATION instance
DEFAULT : a T
result : a T.

Exceptional Situations:

NEXT signals the NO-SUCH-ELEMENT condition when there are no more elements in the enumeration and no default was supplied.

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Methods
Method: next ((x number-enumeration) &optional default)
Source

number-enumerations.lisp.

Method: next ((x array-table-enumeration) &optional default)
Source

array-enumerations.lisp.

Method: next ((x hash-table-enumeration) &optional default)
Source

hash-table-enumerations.lisp.

Method: next ((x string-enumeration) &optional default)
Source

string-enumerations.lisp.

Method: next ((x vector-enumeration) &optional default)
Source

vector-enumerations.lisp.

Method: next ((x list-enumeration) &optional default)
Source

list-enumerations.lisp.

Method: next :around ((x enumeration) &optional default)
Method: next ((x enumeration) &optional default)
Generic Function: number-enumeration-p (x)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

number-enumerations.lisp.

Methods
Method: number-enumeration-p (x)
Method: number-enumeration-p ((x number-enumeration))
Generic Function: previous (x &optional default)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Methods
Method: previous ((x number-enumeration) &optional default)
Source

number-enumerations.lisp.

Method: previous ((x array-table-enumeration) &optional default)
Source

array-enumerations.lisp.

Method: previous ((x string-enumeration) &optional default)
Source

string-enumerations.lisp.

Method: previous ((x vector-enumeration) &optional default)
Source

vector-enumerations.lisp.

Method: previous :around ((x enumeration) &optional default)
Method: previous ((x enumeration) &optional default)
Generic Function: reset (enum)

Resets the enumeration ENUM internal state to its "initial" element.

The "initial" element of the enumeration ENUM obviously depends on the actual enumerate object.

Arguments and Values:

ENUM : an ENUMERATION instance
result : a T.

Examples:

cl-prompt> (defvar *se* (enumerate "foobar" :start 2))
*SE*

cl-prompt> (loop repeat 3 do (print (next *se*)))
#o
#b
#a
NIL

cl-prompt> (current *se*)
#r

cl-prompt> (reset *se*)
2

cl-prompt> (current *se*)
#o

cl-prompt> (loop repeat 3 do (print (next *se*)))
#o
#b
#a
NIL

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Methods
Method: reset ((x number-enumeration))
Source

number-enumerations.lisp.

Method: reset ((x array-table-enumeration))
Source

array-enumerations.lisp.

Method: reset ((x hash-table-enumeration))
Source

hash-table-enumerations.lisp.

Method: reset ((x vector-enumeration))
Source

vector-enumerations.lisp.

Method: reset ((x list-enumeration))
Source

list-enumerations.lisp.

Generic Function: simple-string-enumeration-p (x)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

string-enumerations.lisp.

Methods
Method: simple-string-enumeration-p (x)
Method: simple-string-enumeration-p ((x simple-string-enumeration))
Generic Function: string-enumeration-p (x)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

string-enumerations.lisp.

Methods
Method: string-enumeration-p (x)
Method: string-enumeration-p ((x string-enumeration))
Generic Function: vector-enumeration-p (x)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

vector-enumerations.lisp.

Methods
Method: vector-enumeration-p (x)
Method: vector-enumeration-p ((x vector-enumeration))

5.1.4 Standalone methods

Method: initialize-instance :after ((x vector-enumeration) &key)
Source

vector-enumerations.lisp.

Method: initialize-instance :after ((x list-enumeration) &key)
Source

list-enumerations.lisp.

Method: initialize-instance :after ((x array-table-enumeration) &key start end)
Source

array-enumerations.lisp.

Method: initialize-instance :after ((x hash-table-enumeration) &key keys values key-value-pairs &allow-other-keys)
Source

hash-table-enumerations.lisp.

Method: initialize-instance :after ((x number-enumeration) &key)
Source

number-enumerations.lisp.

Method: print-object ((ne number-enumeration) s)
Source

number-enumerations.lisp.

Method: print-object ((e enumeration) stream)
Source

enumerations.lisp.


5.1.5 Conditions

Condition: no-such-element

The condition signalled when no reasonable element is available.

Many methods (e.g., NEXT) signal this condition if no element is available in and ENUMERATION of some (enumerable) object.

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Direct superclasses

error.

Direct methods

no-such-element-enumeration.

Direct slots
Slot: enum
Initargs

:enumeration

Readers

no-such-element-enumeration.

Writers

This slot is read-only.


5.1.6 Classes

Class: array-table-enumeration

The Array Table Enumeration Class.

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

array-enumerations.lisp.

Direct superclasses
Direct methods
Class: bi-directional-enumeration

The Bi-directional Enumeration Class. Enumerations that can be traversed back and forth.

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Direct superclasses

enumeration.

Direct subclasses
Direct methods

bi-directional-enumeration-p.

Class: bounded-enumeration
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Direct superclasses

enumeration.

Direct subclasses
Direct methods
Direct Default Initargs
InitargValue
:start0
:endnil
Direct slots
Slot: start
Initargs

:start

Readers

enumeration-start.

Writers

(setf enumeration-start).

Slot: end
Initargs

:end

Readers

enumeration-end.

Writers

(setf enumeration-end).

Class: enumeration

The CL Extensions Enumeration Class.

The ’root’ of all the different enumeration classes.

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Direct subclasses
Direct methods
Direct Default Initargs
InitargValue
:objectnil
Direct slots
Slot: enumerated-object
Initargs

:object

Readers

enumeration-object.

Writers

This slot is read-only.

Slot: cursor
Readers

enumeration-cursor.

Writers

(setf enumeration-cursor).

Class: functional-enumeration
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Direct superclasses

enumeration.

Direct subclasses

number-enumeration.

Direct methods

functional-enumeration-p.

Class: hash-table-enumeration

The Hash Table Enumeration Class.

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

hash-table-enumerations.lisp.

Direct superclasses

enumeration.

Direct methods
Direct Default Initargs
InitargValue
:keysnil
:valuest
:key-value-pairsnil
Direct slots
Slot: keysp
Initargs

:keys

Readers

keysp.

Writers

This slot is read-only.

Slot: valuesp
Initargs

:values

Readers

valuesp.

Writers

This slot is read-only.

Slot: kv-pairs-p
Initargs

:key-value-pairs

Readers

key-value-pairs-p.

Writers

This slot is read-only.

Slot: underlying-enumeration
Readers

underlying-enumeration.

Writers

(setf underlying-enumeration).

Class: list-enumeration

The List Enumeration Class.

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

list-enumerations.lisp.

Direct superclasses

sequence-enumeration.

Direct methods
Direct slots
Slot: end-cons
Readers

end-cons.

Writers

(setf end-cons).

Class: number-enumeration
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

number-enumerations.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: cursor
Type

number

Slot: by
Type

function

Initargs

:by

Readers

number-enumeration-increment.

Writers

(setf number-enumeration-increment).

Slot: rev-by
Type

function

Readers

number-enumeration-reverse-increment.

Writers

(setf number-enumeration-reverse-increment).

Class: simple-string-enumeration

The Simple String Enumeration Class.

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

string-enumerations.lisp.

Direct superclasses

string-enumeration.

Direct methods

simple-string-enumeration-p.

Class: string-enumeration

The String Enumeration Class.

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

string-enumerations.lisp.

Direct superclasses

vector-enumeration.

Direct subclasses

simple-string-enumeration.

Direct methods
Class: vector-enumeration
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

vector-enumerations.lisp.

Direct superclasses
Direct subclasses

string-enumeration.

Direct methods
Direct slots
Slot: cursor
Type

fixnum


5.2 Internals


5.2.2 Generic functions

Generic Function: element-type (x)

Returns the type of the elements in the underlying data structure.

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

enumerations.lisp.

Methods
Method: element-type ((x enumeration))
Generic Reader: end-cons (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Reader Method: end-cons ((list-enumeration list-enumeration))

automatically generated reader method

Source

list-enumerations.lisp.

Target Slot

end-cons.

Generic Writer: (setf end-cons) (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Writer Method: (setf end-cons) ((list-enumeration list-enumeration))

automatically generated writer method

Source

list-enumerations.lisp.

Target Slot

end-cons.

Generic Reader: enumeration-cursor (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Reader Method: enumeration-cursor ((enumeration enumeration))

automatically generated reader method

Source

enumerations.lisp.

Target Slot

cursor.

Generic Writer: (setf enumeration-cursor) (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Writer Method: (setf enumeration-cursor) ((enumeration enumeration))

automatically generated writer method

Source

enumerations.lisp.

Target Slot

cursor.

Generic Reader: enumeration-end (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Reader Method: enumeration-end ((bounded-enumeration bounded-enumeration))

automatically generated reader method

Source

enumerations.lisp.

Target Slot

end.

Generic Writer: (setf enumeration-end) (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Writer Method: (setf enumeration-end) ((bounded-enumeration bounded-enumeration))

automatically generated writer method

Source

enumerations.lisp.

Target Slot

end.

Generic Reader: enumeration-object (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Reader Method: enumeration-object ((enumeration enumeration))

automatically generated reader method

Source

enumerations.lisp.

Target Slot

enumerated-object.

Generic Reader: enumeration-start (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Reader Method: enumeration-start ((bounded-enumeration bounded-enumeration))

automatically generated reader method

Source

enumerations.lisp.

Target Slot

start.

Generic Writer: (setf enumeration-start) (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Writer Method: (setf enumeration-start) ((bounded-enumeration bounded-enumeration))

automatically generated writer method

Source

enumerations.lisp.

Target Slot

start.

Generic Reader: key-value-pairs-p (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Reader Method: key-value-pairs-p ((hash-table-enumeration hash-table-enumeration))

automatically generated reader method

Source

hash-table-enumerations.lisp.

Target Slot

kv-pairs-p.

Generic Reader: keysp (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Reader Method: keysp ((hash-table-enumeration hash-table-enumeration))

automatically generated reader method

Source

hash-table-enumerations.lisp.

Target Slot

keysp.

Generic Reader: no-such-element-enumeration (condition)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Reader Method: no-such-element-enumeration ((condition no-such-element))
Source

enumerations.lisp.

Target Slot

enum.

Generic Reader: number-enumeration-increment (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Reader Method: number-enumeration-increment ((number-enumeration number-enumeration))

automatically generated reader method

Source

number-enumerations.lisp.

Target Slot

by.

Generic Writer: (setf number-enumeration-increment) (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Writer Method: (setf number-enumeration-increment) ((number-enumeration number-enumeration))

automatically generated writer method

Source

number-enumerations.lisp.

Target Slot

by.

Generic Reader: number-enumeration-reverse-increment (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Reader Method: number-enumeration-reverse-increment ((number-enumeration number-enumeration))

automatically generated reader method

Source

number-enumerations.lisp.

Target Slot

rev-by.

Generic Writer: (setf number-enumeration-reverse-increment) (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Writer Method: (setf number-enumeration-reverse-increment) ((number-enumeration number-enumeration))

automatically generated writer method

Source

number-enumerations.lisp.

Target Slot

rev-by.

Generic Function: sequence-enumeration-p (x)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

sequence-enumeration.lisp.

Methods
Method: sequence-enumeration-p (x)
Method: sequence-enumeration-p ((x sequence-enumeration))
Generic Reader: underlying-enumeration (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Reader Method: underlying-enumeration ((hash-table-enumeration hash-table-enumeration))

automatically generated reader method

Source

hash-table-enumerations.lisp.

Target Slot

underlying-enumeration.

Generic Writer: (setf underlying-enumeration) (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Writer Method: (setf underlying-enumeration) ((hash-table-enumeration hash-table-enumeration))

automatically generated writer method

Source

hash-table-enumerations.lisp.

Target Slot

underlying-enumeration.

Generic Reader: valuesp (object)
Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Methods
Reader Method: valuesp ((hash-table-enumeration hash-table-enumeration))

automatically generated reader method

Source

hash-table-enumerations.lisp.

Target Slot

valuesp.


5.2.3 Classes

Class: sequence-enumeration

The Sequence Enumeration Class.

Package

it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations.

Source

sequence-enumeration.lisp.

Direct superclasses

bounded-enumeration.

Direct subclasses
Direct methods

sequence-enumeration-p.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   B   C   E   F   G   H   I   K   L   M   N   P   R   S   U   V  
Index Entry  Section

(
(setf end-cons): Private generic functions
(setf end-cons): Private generic functions
(setf enumeration-cursor): Private generic functions
(setf enumeration-cursor): Private generic functions
(setf enumeration-end): Private generic functions
(setf enumeration-end): Private generic functions
(setf enumeration-start): Private generic functions
(setf enumeration-start): Private generic functions
(setf number-enumeration-increment): Private generic functions
(setf number-enumeration-increment): Private generic functions
(setf number-enumeration-reverse-increment): Private generic functions
(setf number-enumeration-reverse-increment): Private generic functions
(setf underlying-enumeration): Private generic functions
(setf underlying-enumeration): Private generic functions

A
array-table-enumeration-p: Public generic functions
array-table-enumeration-p: Public generic functions
array-table-enumeration-p: Public generic functions

B
bi-directional-enumeration-p: Public generic functions
bi-directional-enumeration-p: Public generic functions
bi-directional-enumeration-p: Public generic functions
bounded-enumeration-p: Public generic functions
bounded-enumeration-p: Public generic functions
bounded-enumeration-p: Public generic functions

C
current: Public generic functions
current: Public generic functions
current: Public generic functions
current: Public generic functions
current: Public generic functions
current: Public generic functions
current: Public generic functions

E
element-type: Private generic functions
element-type: Private generic functions
end-cons: Private generic functions
end-cons: Private generic functions
enumerate: Public generic functions
enumerate: Public generic functions
enumerate: Public generic functions
enumerate: Public generic functions
enumerate: Public generic functions
enumerate: Public generic functions
enumerate: Public generic functions
enumerate: Public generic functions
enumerate-key-value-pairs: Private ordinary functions
enumerate-keys: Private ordinary functions
enumerate-values: Private ordinary functions
enumeration-cursor: Private generic functions
enumeration-cursor: Private generic functions
enumeration-end: Private generic functions
enumeration-end: Private generic functions
enumeration-object: Private generic functions
enumeration-object: Private generic functions
enumeration-start: Private generic functions
enumeration-start: Private generic functions
enumerationp: Public generic functions
enumerationp: Public generic functions
enumerationp: Public generic functions

F
foreach: Public macros
Function, enumerate-key-value-pairs: Private ordinary functions
Function, enumerate-keys: Private ordinary functions
Function, enumerate-values: Private ordinary functions
Function, range: Public ordinary functions
functional-enumeration-p: Public generic functions
functional-enumeration-p: Public generic functions
functional-enumeration-p: Public generic functions

G
Generic Function, (setf end-cons): Private generic functions
Generic Function, (setf enumeration-cursor): Private generic functions
Generic Function, (setf enumeration-end): Private generic functions
Generic Function, (setf enumeration-start): Private generic functions
Generic Function, (setf number-enumeration-increment): Private generic functions
Generic Function, (setf number-enumeration-reverse-increment): Private generic functions
Generic Function, (setf underlying-enumeration): Private generic functions
Generic Function, array-table-enumeration-p: Public generic functions
Generic Function, bi-directional-enumeration-p: Public generic functions
Generic Function, bounded-enumeration-p: Public generic functions
Generic Function, current: Public generic functions
Generic Function, element-type: Private generic functions
Generic Function, end-cons: Private generic functions
Generic Function, enumerate: Public generic functions
Generic Function, enumeration-cursor: Private generic functions
Generic Function, enumeration-end: Private generic functions
Generic Function, enumeration-object: Private generic functions
Generic Function, enumeration-start: Private generic functions
Generic Function, enumerationp: Public generic functions
Generic Function, functional-enumeration-p: Public generic functions
Generic Function, has-more-elements-p: Public generic functions
Generic Function, has-next-p: Public generic functions
Generic Function, has-previous-p: Public generic functions
Generic Function, hash-table-enumeration-p: Public generic functions
Generic Function, key-value-pairs-p: Private generic functions
Generic Function, keysp: Private generic functions
Generic Function, list-enumeration-p: Public generic functions
Generic Function, next: Public generic functions
Generic Function, no-such-element-enumeration: Private generic functions
Generic Function, number-enumeration-increment: Private generic functions
Generic Function, number-enumeration-p: Public generic functions
Generic Function, number-enumeration-reverse-increment: Private generic functions
Generic Function, previous: Public generic functions
Generic Function, reset: Public generic functions
Generic Function, sequence-enumeration-p: Private generic functions
Generic Function, simple-string-enumeration-p: Public generic functions
Generic Function, string-enumeration-p: Public generic functions
Generic Function, underlying-enumeration: Private generic functions
Generic Function, valuesp: Private generic functions
Generic Function, vector-enumeration-p: Public generic functions

H
has-more-elements-p: Public generic functions
has-more-elements-p: Public generic functions
has-more-elements-p: Public generic functions
has-more-elements-p: Public generic functions
has-more-elements-p: Public generic functions
has-more-elements-p: Public generic functions
has-more-elements-p: Public generic functions
has-next-p: Public generic functions
has-next-p: Public generic functions
has-next-p: Public generic functions
has-next-p: Public generic functions
has-next-p: Public generic functions
has-next-p: Public generic functions
has-next-p: Public generic functions
has-previous-p: Public generic functions
has-previous-p: Public generic functions
has-previous-p: Public generic functions
has-previous-p: Public generic functions
has-previous-p: Public generic functions
hash-table-enumeration-p: Public generic functions
hash-table-enumeration-p: Public generic functions
hash-table-enumeration-p: Public generic functions

I
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods

K
key-value-pairs-p: Private generic functions
key-value-pairs-p: Private generic functions
keysp: Private generic functions
keysp: Private generic functions

L
list-enumeration-p: Public generic functions
list-enumeration-p: Public generic functions
list-enumeration-p: Public generic functions

M
Macro, foreach: Public macros
Method, (setf end-cons): Private generic functions
Method, (setf enumeration-cursor): Private generic functions
Method, (setf enumeration-end): Private generic functions
Method, (setf enumeration-start): Private generic functions
Method, (setf number-enumeration-increment): Private generic functions
Method, (setf number-enumeration-reverse-increment): Private generic functions
Method, (setf underlying-enumeration): Private generic functions
Method, array-table-enumeration-p: Public generic functions
Method, array-table-enumeration-p: Public generic functions
Method, bi-directional-enumeration-p: Public generic functions
Method, bi-directional-enumeration-p: Public generic functions
Method, bounded-enumeration-p: Public generic functions
Method, bounded-enumeration-p: Public generic functions
Method, current: Public generic functions
Method, current: Public generic functions
Method, current: Public generic functions
Method, current: Public generic functions
Method, current: Public generic functions
Method, current: Public generic functions
Method, element-type: Private generic functions
Method, end-cons: Private generic functions
Method, enumerate: Public generic functions
Method, enumerate: Public generic functions
Method, enumerate: Public generic functions
Method, enumerate: Public generic functions
Method, enumerate: Public generic functions
Method, enumerate: Public generic functions
Method, enumerate: Public generic functions
Method, enumeration-cursor: Private generic functions
Method, enumeration-end: Private generic functions
Method, enumeration-object: Private generic functions
Method, enumeration-start: Private generic functions
Method, enumerationp: Public generic functions
Method, enumerationp: Public generic functions
Method, functional-enumeration-p: Public generic functions
Method, functional-enumeration-p: Public generic functions
Method, has-more-elements-p: Public generic functions
Method, has-more-elements-p: Public generic functions
Method, has-more-elements-p: Public generic functions
Method, has-more-elements-p: Public generic functions
Method, has-more-elements-p: Public generic functions
Method, has-more-elements-p: Public generic functions
Method, has-next-p: Public generic functions
Method, has-next-p: Public generic functions
Method, has-next-p: Public generic functions
Method, has-next-p: Public generic functions
Method, has-next-p: Public generic functions
Method, has-next-p: Public generic functions
Method, has-previous-p: Public generic functions
Method, has-previous-p: Public generic functions
Method, has-previous-p: Public generic functions
Method, has-previous-p: Public generic functions
Method, hash-table-enumeration-p: Public generic functions
Method, hash-table-enumeration-p: Public generic functions
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, key-value-pairs-p: Private generic functions
Method, keysp: Private generic functions
Method, list-enumeration-p: Public generic functions
Method, list-enumeration-p: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, no-such-element-enumeration: Private generic functions
Method, number-enumeration-increment: Private generic functions
Method, number-enumeration-p: Public generic functions
Method, number-enumeration-p: Public generic functions
Method, number-enumeration-reverse-increment: Private generic functions
Method, previous: Public generic functions
Method, previous: Public generic functions
Method, previous: Public generic functions
Method, previous: Public generic functions
Method, previous: Public generic functions
Method, previous: Public generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, reset: Public generic functions
Method, reset: Public generic functions
Method, reset: Public generic functions
Method, reset: Public generic functions
Method, reset: Public generic functions
Method, sequence-enumeration-p: Private generic functions
Method, sequence-enumeration-p: Private generic functions
Method, simple-string-enumeration-p: Public generic functions
Method, simple-string-enumeration-p: Public generic functions
Method, string-enumeration-p: Public generic functions
Method, string-enumeration-p: Public generic functions
Method, underlying-enumeration: Private generic functions
Method, valuesp: Private generic functions
Method, vector-enumeration-p: Public generic functions
Method, vector-enumeration-p: Public generic functions

N
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
no-such-element-enumeration: Private generic functions
no-such-element-enumeration: Private generic functions
number-enumeration-increment: Private generic functions
number-enumeration-increment: Private generic functions
number-enumeration-p: Public generic functions
number-enumeration-p: Public generic functions
number-enumeration-p: Public generic functions
number-enumeration-reverse-increment: Private generic functions
number-enumeration-reverse-increment: Private generic functions

P
previous: Public generic functions
previous: Public generic functions
previous: Public generic functions
previous: Public generic functions
previous: Public generic functions
previous: Public generic functions
previous: Public generic functions
print-object: Public standalone methods
print-object: Public standalone methods

R
range: Public ordinary functions
reset: Public generic functions
reset: Public generic functions
reset: Public generic functions
reset: Public generic functions
reset: Public generic functions
reset: Public generic functions

S
sequence-enumeration-p: Private generic functions
sequence-enumeration-p: Private generic functions
sequence-enumeration-p: Private generic functions
simple-string-enumeration-p: Public generic functions
simple-string-enumeration-p: Public generic functions
simple-string-enumeration-p: Public generic functions
string-enumeration-p: Public generic functions
string-enumeration-p: Public generic functions
string-enumeration-p: Public generic functions

U
underlying-enumeration: Private generic functions
underlying-enumeration: Private generic functions

V
valuesp: Private generic functions
valuesp: Private generic functions
vector-enumeration-p: Public generic functions
vector-enumeration-p: Public generic functions
vector-enumeration-p: Public generic functions


A.4 Data types

Jump to:   A   B   C   E   F   H   I   L   N   P   S   V  
Index Entry  Section

A
array-enumerations.lisp: The enumerations/array-enumerations․lisp file
array-table-enumeration: Public classes

B
bi-directional-enumeration: Public classes
bounded-enumeration: Public classes

C
Class, array-table-enumeration: Public classes
Class, bi-directional-enumeration: Public classes
Class, bounded-enumeration: Public classes
Class, enumeration: Public classes
Class, functional-enumeration: Public classes
Class, hash-table-enumeration: Public classes
Class, list-enumeration: Public classes
Class, number-enumeration: Public classes
Class, sequence-enumeration: Private classes
Class, simple-string-enumeration: Public classes
Class, string-enumeration: Public classes
Class, vector-enumeration: Public classes
Condition, no-such-element: Public conditions

E
enumeration: Public classes
enumerations: The enumerations system
enumerations-pkg.lisp: The enumerations/enumerations-pkg․lisp file
enumerations.asd: The enumerations/enumerations․asd file
enumerations.lisp: The enumerations/enumerations․lisp file

F
File, array-enumerations.lisp: The enumerations/array-enumerations․lisp file
File, enumerations-pkg.lisp: The enumerations/enumerations-pkg․lisp file
File, enumerations.asd: The enumerations/enumerations․asd file
File, enumerations.lisp: The enumerations/enumerations․lisp file
File, foreach.lisp: The enumerations/foreach․lisp file
File, hash-table-enumerations.lisp: The enumerations/hash-table-enumerations․lisp file
File, list-enumerations.lisp: The enumerations/list-enumerations․lisp file
File, number-enumerations.lisp: The enumerations/number-enumerations․lisp file
File, sequence-enumeration.lisp: The enumerations/sequence-enumeration․lisp file
File, string-enumerations.lisp: The enumerations/string-enumerations․lisp file
File, vector-enumerations.lisp: The enumerations/vector-enumerations․lisp file
foreach.lisp: The enumerations/foreach․lisp file
functional-enumeration: Public classes

H
hash-table-enumeration: Public classes
hash-table-enumerations.lisp: The enumerations/hash-table-enumerations․lisp file

I
it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations: The it․unimib․disco․ma․common-lisp․extensions․data-and-control-flow․enumerations package

L
list-enumeration: Public classes
list-enumerations.lisp: The enumerations/list-enumerations․lisp file

N
no-such-element: Public conditions
number-enumeration: Public classes
number-enumerations.lisp: The enumerations/number-enumerations․lisp file

P
Package, it.unimib.disco.ma.common-lisp.extensions.data-and-control-flow.enumerations: The it․unimib․disco․ma․common-lisp․extensions․data-and-control-flow․enumerations package

S
sequence-enumeration: Private classes
sequence-enumeration.lisp: The enumerations/sequence-enumeration․lisp file
simple-string-enumeration: Public classes
string-enumeration: Public classes
string-enumerations.lisp: The enumerations/string-enumerations․lisp file
System, enumerations: The enumerations system

V
vector-enumeration: Public classes
vector-enumerations.lisp: The enumerations/vector-enumerations․lisp file