CL Enumerations: Standard Generic Function HAS-NEXT-P
 

Generic function HAS-NEXT-P

Package:

CL.EXTENSIONS.ENUMERATIONS

Syntax:

  has-next-p enumeration
  => result
  

Arguments and Values:

enumeration---an enumeration instance

result---a generalized boolean

Description:

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.

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
  

Affected By:

None.

Exceptional Situations:

None.

See Also:

ENUMERATION class, NEXT, CURRENT, PREVIOUS, HAS-PREVIOUS-P, NO-SUCH-ELEMENT.

Notes:

None.