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

cdr

cdr( 
l_list 
) 
=> l_result

Description

Returns the tail of the list, that is, the list without its first element.

The expression cdr(nil) returns nil.  cdr was a machine language instruction on the first machine to run Lisp. cdr stands for contents of the decrement register.

Arguments

l_list

List of elements.

Value Returned

l_result

The end of a list, or the list minus the first element.

Examples

cdr( '(a b c) )  => (b c)
z = '(1 2 3)
cdr(z)   => (2 3)
cdr always returns a list. Therefore, cdr('(2 3)) returns the list (3) rather than the integer 3.

Related Topics

caar, caaar, caadr, cadr, caddr, cdar, cddr, ...


Return to top
 ⠀
X