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

nthcdr

nthcdr( 
x_count 
l_list 
) 
=> l_result

Description

Applies cdr to a list a given number of times.

Arguments

x_count

Number of times to apply cdr to l_list.

l_list

List of elements.

Value Returned

l_result

Result of applying cdr to l_list, x_count number of times.

Examples

nthcdr( 3 '(a b c d))  
=> (d)
z = '(1 2 3)
nthcdr(2 z)
=> (3)
nthcdr(-1 z)           
=> (nil 1 2 3)

If x_count is less than 0, then cons(nil l_list) is returned.

Related Topics

nth


Return to top
 ⠀
X