Generic function CURRENT
Package:
CL.EXTENSIONS.ENUMERATIONS
Syntax:
current enumeration &optional errorp default => object
Arguments and Values:
enumeration---an enumeration instance
errorp---a generalized boolean
(default T)
default---an object (default NIL)
object---an object
Description:
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, a call to CURRENT signals a possibly continuable error if no element of the enumeration is available. Specialized methods of CURRENT signal an error of type NO-SUCH-ELEMENT.
If errorp is NIL, and there is no "current" element in enumeration, then default is returned.
Affected By:
The internal state of enumeration.
Exceptional Situations:
CURRENT may signal a continuable error or NO-SUCH-ELEMENT. See above for an explanation.
See Also:
ENUMERATION class, BOUNDED-ENUMERATION, NUMBER-ENUMERATION, BI-DIRECTIONAL-ENUMERATION, SEQUENCE-ENUMERATION, LIST-ENUMERATION, ARRAY-ENUMERATION, VECTOR-ENUMERATION, STRING-ENUMERATION, HASH-TABLE-ENUMERATION, NO-SUCH-ELEMENT.
Notes:
None.