Copyright (C) 2000-2012 |
GNU Info (librep.info)Sequence FunctionsSequence Functions ------------------ - Function: sequencep arg Returns true if ARG is a sequence, i.e. a list or an array. - 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) => () (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 automatically generated by info2www version 1.2.2.9 |