Function: seq-concatenate

seq-concatenate is a byte-compiled function defined in seq.el.gz.

Signature

(seq-concatenate TYPE SEQUENCE...)

Documentation

Concatenate SEQUENCES into a single sequence of type TYPE.

TYPE must be one of following symbols: vector, string or list. This does not modify any of the SEQUENCES.

Other relevant functions are documented in the sequence group.

View in manual

Shortdoc

;; sequence
(seq-concatenate 'vector '(1 2) '(c d))
    => [1 2 c d]

Implementations

(seq-concatenate TYPE &rest SEQUENCES) in `seq.el'.

Undocumented

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/seq.el.gz
(cl-defgeneric seq-concatenate (type &rest sequences)
  "Concatenate SEQUENCES into a single sequence of type TYPE.
TYPE must be one of following symbols: `vector', `string' or `list'.
This does not modify any of the SEQUENCES.

\n(fn TYPE SEQUENCE...)"
  (setq sequences (mapcar #'seq-into-sequence sequences))
  (pcase type
    ('vector (apply #'vconcat sequences))
    ('string (apply #'concat sequences))
    ('list (apply #'append (append sequences '(nil))))
    (_ (error "Not a sequence type name: %S" type))))