(ddd-themes.info)Accessing List Elements


Next: Manipulating Lists Prev: List Properties Up: List Functions
Enter node , (file) or (file)node

B.12.3 Accessing List Elements
------------------------------

 -- VSL Function: car (list)
 -- VSL Function: head (list)
     Returns the first element of LIST:  `car([1, 2, 3]) => 1'

 -- VSL Function: cdr (list)
 -- VSL Function: tail (list)
     Returns LIST without its first element:  `cdr([1, 2, 3]) => [2, 3]'

 -- VSL Function: elem (list, n)
     Returns the N-th element (starting with 0) of LIST: `elem([4, 5,
     6], 0) => 4'

 -- VSL Function: pos (elem, list)
     Returns the position of ELEM in LIST (starting with 0): `pos(4,
     [1, 2, 4]) => 2'

 -- VSL Function: last (list)
     Returns the last element of LIST: `last([4, 5, 6]) => 6'


automatically generated by info2www version 1.2.2.9