Name

set-cdr

Usage

builtin-function

Syntax

(set-cdr list item)

Description

Assigns the list item to the rest or cdr of list.

user > (let z '(1 111))
it: z
user > (set-cdr z '(111))
it: (111)
user > z
it: (1 111)
user > (macroexpand '(setf (cdr z) '(111)))
it: (set-cdr z '(111))