It's a common name for this function and symmetric with respect to
`take`. It's also a lot less awkward to type and say.
* lisp/subr.el (drop): New alias.
* doc/lispref/lists.texi (List Elements): Document. Mention the
equation tying `take` and `drop` together.
* etc/NEWS: Announce.
(cherry picked from commit
8718a7c7062eb562e2fda0dee5f7bfddb0861f1d)
@xref{Sequence Functions}.
@end defun
+@findex drop
@defun nthcdr n list
This function returns the @var{n}th @sc{cdr} of @var{list}. In other
words, it skips past the first @var{n} links of @var{list} and returns
@var{list}. If the length of @var{list} is @var{n} or less,
@code{nthcdr} returns @code{nil}.
+An alias for @code{nthcdr} is @code{drop}.
+
@example
@group
(nthcdr 1 '(1 2 3 4))
@code{take} returns @var{list} if shorter than @var{n} elements;
it returns @code{nil} if @var{n} is zero or negative.
+In general, @code{(append (take @var{n} @var{list}) (drop @var{n} @var{list}))}
+will return a list equal to @var{list}.
+
@example
@group
(take 3 '(a b c d))
Mostly used internally to do a kind of topological sort of
inheritance hierarchies.
++++
+** 'drop' is now an alias for the function 'nthcdr'.
+
+++
** New polymorphic comparison function 'value<'.
This function returns non-nil if the first argument is less than the
\f
;;;; Alternate names for functions - these are not being phased out.
+(defalias 'drop #'nthcdr)
(defalias 'send-string #'process-send-string)
(defalias 'send-region #'process-send-region)
(defalias 'string= #'string-equal)