Common Lisp Package: IT.UNIMIB.DISCO.MA.COMMON-LISP.EXTENSIONS.DATA-AND-CONTROL-FLOW.ENUMERATIONS

The CL Extensions Enemeration Package. The package containing the API for a generic enumeration protocol in Common Lisp.

README:

FUNCTION

Public

Undocumented

RANGE (START END &OPTIONAL (INCR #'1+))

Private

Undocumented

ENUMERATE-KEY-VALUE-PAIRS (HT)

ENUMERATE-KEYS (HT)

ENUMERATE-VALUES (HT)

MACRO

Public

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. The syntax of FOREACH is FOREACH (<var> <object> &rest <keys>) &body <forms-and-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.

GENERIC-FUNCTION

Public

CURRENT (ENUM &OPTIONAL ERRORP DEFAULT)

Returns the "current" element in the enumeration ENUM. 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.

ENUMERATE (ENUMERABLE-ITEM &KEY START END (BY #'1+) KEYS (VALUES T) KEY-VALUE-PAIRS &ALLOW-OTHER-KEYS)

Creates a (specialized) ENUMERATION object. If applicable START and END delimit the range of the actual enumeration.

HAS-MORE-ELEMENTS-P (X)

Checks whether the enumeration has more elements. Obsolete.

HAS-NEXT-P (X)

Checks whether the enumeration has more elements. Obsolete.

RESET (ENUM)

Resets the enumeration ENUM to the "initial" element.

Undocumented

ARRAY-TABLE-ENUMERATION-P (X)

BI-DIRECTIONAL-ENUMERATION-P (X)

BOUNDED-ENUMERATION-P (X)

ENUMERATIONP (X)

FUNCTIONAL-ENUMERATION-P (X)

HAS-PREVIOUS-P (X)

HASH-TABLE-ENUMERATION-P (X)

LIST-ENUMERATION-P (X)

NEXT (X &OPTIONAL DEFAULT)

NUMBER-ENUMERATION-P (X)

PREVIOUS (X &OPTIONAL DEFAULT)

SIMPLE-STRING-ENUMERATION-P (X)

STRING-ENUMERATION-P (X)

VECTOR-ENUMERATION-P (X)

Private

ELEMENT-TYPE (X)

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

Undocumented

NO-SUCH-ELEMENT-ENUMERATION (CONDITION)

SEQUENCE-ENUMERATION-P (X)

SLOT-ACCESSOR

Private

Undocumented

END-CONS (OBJECT)

SETFEND-CONS (NEW-VALUE OBJECT)

ENUMERATION-CURSOR (OBJECT)

SETFENUMERATION-CURSOR (NEW-VALUE OBJECT)

ENUMERATION-END (OBJECT)

SETFENUMERATION-END (NEW-VALUE OBJECT)

ENUMERATION-OBJECT (OBJECT)

ENUMERATION-START (OBJECT)

SETFENUMERATION-START (NEW-VALUE OBJECT)

KEY-VALUE-PAIRS-P (OBJECT)

KEYSP (OBJECT)

NUMBER-ENUMERATION-INCREMENT (OBJECT)

SETFNUMBER-ENUMERATION-INCREMENT (NEW-VALUE OBJECT)

NUMBER-ENUMERATION-REVERSE-INCREMENT (OBJECT)

SETFNUMBER-ENUMERATION-REVERSE-INCREMENT (NEW-VALUE OBJECT)

UNDERLYING-ENUMERATION (OBJECT)

SETFUNDERLYING-ENUMERATION (NEW-VALUE OBJECT)

VALUESP (OBJECT)

CLASS

Public

ARRAY-TABLE-ENUMERATION

The Array Table Enumeration Class.

BI-DIRECTIONAL-ENUMERATION

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

ENUMERATION

The CL Extensions Enumaration Class.

HASH-TABLE-ENUMERATION

The Hash Table Enumeration Class.

LIST-ENUMERATION

The List Enumeration Class.

SIMPLE-STRING-ENUMERATION

The Simple String Enumeration Class.

STRING-ENUMERATION

The String Enumeration Class.

Undocumented

BOUNDED-ENUMERATION

FUNCTIONAL-ENUMERATION

NUMBER-ENUMERATION

VECTOR-ENUMERATION

Private

SEQUENCE-ENUMERATION

The Sequence Enumeration Class.

CONDITION

Private

Undocumented

NO-SUCH-ELEMENT