Accessing elements in a list
|
(car a_list) |
|
(cdr a_list) |
Examples
(car '(a b c)) |
A |
(cdr '(a b c)) |
(B C) |
(car '((3 b) c)) |
|
(cdr '((3 b) c)) |
|
(cdr '(a)) |
|
(setq a_list '((23.9 ab) (apples oranges cherries) (dogs cats cows))) |
|
(car (car a_list)) |
|
(cdr (cdr a_list)) |
|
(car (cdr a_list)) |
|
(cdr (car a_list)) |
|
(caar a_list) |
|
(cddr a_list) |
|
(cadr a_list) |
|
(cdar a_list) |
This website has been archived and is no longer maintained.