Function: seq-drop

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

Signature

(seq-drop SEQUENCE N)

Documentation

Remove the first N elements of SEQUENCE and return the resulting sequence.

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

If N is a negative integer or zero, SEQUENCE is returned.

Other relevant functions are documented in the sequence group.

View in manual

Shortdoc

;; sequence
(seq-drop '(a b c) 2)
    => (c)

Implementations

(seq-drop (LIST list) N) in `seq.el'.

Optimized implementation of `seq-drop' for lists.

(seq-drop SEQUENCE N) in `seq.el'.

Undocumented

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/seq.el.gz
(cl-defgeneric seq-drop (sequence n)
  "Remove the first N elements of SEQUENCE and return the resulting sequence.
The result is a sequence of the same type as SEQUENCE.

If N is a negative integer or zero, SEQUENCE is returned."
  (if (<= n 0)
      sequence
    (let ((length (seq-length sequence)))
      (seq-subseq sequence (min n length) length))))