Handbook
Glossary
lnth ( n list -- elt )
Factor handbook
»
The language
»
Collections
»
Lists
»
Manipulating lists
Prev:
unswons ( cons -- cdr car )
Next:
cadr ( list -- elt )
Vocabulary
lists
Inputs
n
an integer index
list
a
list
Outputs
elt
the element at the nth index
Word description
Outputs the nth element of the list.
See also
llength
,
cons
,
car
,
cdr
Definition
USING:
kernel
math
;
IN:
lists
:
lnth
( n list -- elt )
swap
[
cdr
]
times
car
;
inline