GNU Emacs Lisp Reference Manual
Here are some functions that relate to vectors:
t if object is a vector.
(vectorp [a])
=> t
(vectorp "asdf")
=> nil
(vector 'foo 23 [bar baz] "rats")
=> [foo 23 [bar baz] "rats"]
(vector)
=> []
(setq sleepy (make-vector 9 'Z))
=> [Z Z Z Z Z Z Z Z Z]
The value is a newly constructed vector that is not eq to any
existing vector.
(setq a (vconcat '(A B C) '(D E F)))
=> [A B C D E F]
(eq a (vconcat a))
=> nil
(vconcat)
=> []
(vconcat [A B C] "aa" '(foo (6 7)))
=> [A B C 97 97 foo (6 7)]
The vconcat function also allows integers as arguments. It
converts them to strings of digits, making up the decimal print
representation of the integer, and then uses the strings instead of the
original integers. Don't use this feature; we plan to eliminate it. If you already use this feature, change your programs now! The
proper way to convert an integer to a decimal number in this way is with
format (see Formatting Strings) or number-to-string
(see String Conversion).
For other concatenation functions, see mapconcat in Mapping Functions, concat in Creating Strings, and append
in Building Lists.
The append function provides a way to convert a vector into a
list with the same elements (see Building Lists):
(setq avector [1 two (quote (three)) "four" [five]])
=> [1 two (quote (three)) "four" [five]]
(append avector nil)
=> (1 two (quote (three)) "four" [five])