User Tools


Accessor ELT

Syntax

  • elt sequence indexobject
  • (setf (elt sequence index) new-object)

Arguments and Values

Description

Accesses the element of sequence specified by index.

Examples

(defparameter *str* (copy-seq "0123456789"))

*STR*

(elt *str* 6)

#\6

(setf (elt *str* 0) #\#)

#\#

*str*

"#123456789"

Side Effects

None.

Affected By

None.

Exceptional Situations

Should be prepared to signal an error of type type-error if sequence is not a proper sequence. Should signal an error of type type-error if index is not a valid sequence index for sequence.

See Also

Notes

aref may be used to access vector elements that are beyond the vector's fill pointer.

\issue{CONSTANT-MODIFICATION:DISALLOW}