Simplified Common Lisp reference
last
Symbol class: Conses, Lists and related functions
Syntax:
Symbol type: function
lastlistn(optional) => list
Argument description:
list a list
n a non-negative integer, default is 1

LAST function returns the list of N last elements of list argument. See BUTLAST.

(last '(1 2 3)) => (3)
(last '(1 2 3) 0) => NIL
(last '(1 2 3) 1) => (3)
(last '(1 2 3) 2) => (2 3)
(last '(1 2 3) 3) => (1 2 3)
(last '(1 2 3) 4) => (1 2 3)
(last '(a . b) 0) => B
(last '(a . b) 1) => (A . B)
(last '(a . b) 2) => (A . B)
Function indexFull documentation for last (HyperSpec)