Go to the first, previous, next, last section, table of contents.
- Function: length sequence
-
This function returns the length (an integer) of the sequence sequence.
(length "abc")
=> 3
(length '(1 2 3 4))
=> 4
(length [x y])
=> 2
- Function: copy-sequence sequence
-
Returns a new copy of the sequence sequence. Where possible (in lists
and vectors) only the `structure' of the sequence is newly allocated: the
same objects are used for the elements in both sequences.
(copy-sequence "xy")
=> "xy"
(setq x '("one" "two"))
=> ("one" "two")
(setq y (copy-sequence x))
=> ("one" "two")
(eq x y)
=> nil
(eq (car x) (car y))
=> t
- Function: elt sequence position
-
This function returns the element of sequence position elements
from the beginning of the sequence.
This function is a combination of the nth and aref functions.
(elt [0 1 2 3] 1)
=> 1
(elt '(foo bar) 0)
=> foo
Go to the first, previous, next, last section, table of contents.