Function: nth

nth is a function defined in fns.c.

Signature

(nth N LIST)

Documentation

Return the Nth element of LIST.

N counts from zero. If LIST is not that long, nil is returned.

Other relevant functions are documented in the list group.

Probably introduced at or before Emacs version 1.3.

Shortdoc

;; list
(nth 1 '(one two three))
    => two

Aliases

nth-value (obsolete since 27.1) cl-nth-value

Source Code

// Defined in /usr/src/emacs/src/fns.c
{
  return Fcar (Fnthcdr (n, list));
}