Function: seq-remove-at-position

seq-remove-at-position is a byte-compiled function defined in seq.el.gz.

Signature

(seq-remove-at-position SEQUENCE N)

Documentation

Return a copy of SEQUENCE with the element at index N removed.

N is the (zero-based) index of the element that should not be in the result.

The result is a sequence of the same type as SEQUENCE.

Other relevant functions are documented in the sequence group.

View in manual

Probably introduced at or before Emacs version 29.1.

Shortdoc

;; sequence
(seq-remove-at-position '(a b c d e) 3)
    => (a b c e)
  (seq-remove-at-position [a b c d e] 0)
    => [b c d e]

Implementations

(seq-remove-at-position SEQUENCE N) in `seq.el'.

Undocumented

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/seq.el.gz
;;;###autoload
(cl-defgeneric seq-remove-at-position (sequence n)
  "Return a copy of SEQUENCE with the element at index N removed.

N is the (zero-based) index of the element that should not be in
the result.

The result is a sequence of the same type as SEQUENCE."
  (seq-concatenate
   (if (listp sequence) 'list (type-of sequence))
   (seq-subseq sequence 0 n)
   (seq-subseq sequence (1+ n))))