Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

setcdr

setcdr( 
l_arg1 
l_arg2 
) 
=> l_result

Description

Replaces the tail of a list with the elements of a second list in the same way as rplacd. This is a destructive operation, meaning that any other reference to the list will also see the change.

Arguments

l_arg1

List that is modified.

l_arg2

List that replaces the cdr of l_arg1.

Value Returned

l_result

Modified l_arg1 with the cdr of the list l_arg1 replaced with l_arg2.

Examples

x = '(a b c)
setcdr( x '(d e f))
=> (a d e f)
x                      
=> (a d e f)

The cdr of x is replaced by the second argument.

Related Topics

rplacd

rplaca

setcar


Return to top
 ⠀
X