length
length sequence → n
sequence—a proper sequence.
n—a non-negative integer.
14.1.0 9Returns the number of elements in sequence.
If sequence is a vector with a fill pointer, the active length as specified by the fill pointer is returned.
(length "abc") → 3
(setq str (make-array '(3) :element-type 'character
:initial-contents "abc"
:fill-pointer t)) → "abc"
(length str) → 3
(setf (fill-pointer str) 2) → 2
(length str) → 2
None.
Should be prepared to signal an error of type type-error if sequence is not a proper sequence. It's implied by lazychecktype.
The results are undefined if \param{sequence} is a \term{circular list}.
Per X3J13. -kmp 05-Oct-93
None.